GefObject.Type (read-only property)

Gets the type of an object.
Syntax: GefObjectTypeEnum = object.Type
Description: The Type property gets the GefObjectTypeEnum value that indicates the kind of object it is.


Sub GefObjectType()
    Dim oCimObj As GefObject
    Set oCimObj = CimGetObject
    Select Case oCimObj.Type
        Case gefLine
            MsgBox "Line Object"
        Case gefArc
            MsgBox "Arc Object"
        Case gefEllipse
            MsgBox "Ellipse Object"
        Case gefRectangle
            MsgBox "Rectangle Object"
        Case gefText
            MsgBox "Text Object"
        Case gefButton
            MsgBox "Text Button Object"
        Case gefActiveXControl
            MsgBox "ActiveX Control"
        Case gefOleObject
            MsgBox "OLE Object"
        Case gefClassObject
            MsgBox "Class Object"
        Case gefGroup
            MsgBox "Group Object"
        Case gefFrame
            MsgBox "Frame Object"
        Case gefFrameContainer
            MsgBox "Frame Container Object"
        Case gefLinkContainer
            MsgBox "Link Container Object"
        Case gefObjectScreen
            MsgBox "Screen's GefObject"
    End Select
End Sub