OLEObject OLEObject OLEObject Interface


Represents an ActiveX control or a linked or embedded OLE object on a worksheet. The OLEObject object is a member of the OLEObjects collection. The OLEObjects collection contains all the OLE objects on a single worksheet.

public interface class OLEObject : Microsoft::Office::Interop::Excel::_OLEObject, Microsoft::Office::Interop::Excel::OLEObjectEvents_Event
public interface OLEObject : Microsoft.Office.Interop.Excel._OLEObject, Microsoft.Office.Interop.Excel.OLEObjectEvents_Event
Public Interface OLEObject
Implements _OLEObject, OLEObjectEvents_Event


This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _OLEObject.

Use OLEObjects(index), where index is the name or number of the object, to return an OLEObject object.

The properties and methods of the OLEObject object are duplicated on each ActiveX control on a worksheet. This enables access to these properties by using the control’s name.

Applies to