GefObject.OleObject (read-only property)

Gets an object representing the automation interface of an OLE object or Active X control.
Syntax: Set object = object.OleObject
Description: This property only applies to objects of type GefActiveXControl or GefOleObject.

If property is not valid for a particular object type, it returns Nothing.


Sub GefObject_OLEObject()
    Dim oCimObj As GefObject
    Dim oCimOLEObj As Object
    Set oCimObj = CimGetObject
    Set oCimOLEObj = oCimObj.OLEObject
    If Not oCimOLEObj Is Nothing Then
        MsgBox "The Selected object is an OLE object"
        MsgBox "The selected object is not an OLE object"
    End If
End Sub