LpOleObject Property [Access 2003 VBA Language Reference]

You can use the LpOLEObject property in Visual Basic to determine the memory address of an OLE object. The LpOLEObject property returns a Long value representing a pointer to an IOLEObject.

expression.LpOleObject

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

You can use the LpOLEObject property to refer to the address of the active OLE object. If no object is displayed, the setting is 0.

This property setting isn't available in Design view and is read-only in other views.

In the OLE dynamic link libraries (DLLs), many function calls require the address of the OLE object as an argument. You can pass the value specified by the LpOLEObject property when making application programming interface (API) calls to the OLE DLLs.

Note  If an API call is made to a function that makes a callback to the control, the results will be unpredictable.

Example

To return the value of the LpOLEObject property for the "Customer Picture" OLE control on the "Order Entry" form, you can use the following:

Dim l As Long
l = Forms("Order Entry").Controls("Customer Picture").LpOleObject

Applies to | BoundObjectFrame Object | CustomControl Object | ObjectFrame Object

See Also | Hwnd Property