GefObjectExpressions.Item (method)

Returns a specified expression from the collection.
Syntax: Set GefObjectExpression = object.Item ( Index )
Index As long - The numeric index of the collection. The numeric index ranges from 0 to GefObjectExpressions.Count-1.
Description: The Item method will return only expressions defined for the particular GefObject. It does not return expressions from any of the parent objects.

If the index does not correspond to a expression, the method returns Nothing.


Sub GefObjectExpressions_Item()
    Dim oCimObj As GefObject
    Dim oCimObjExprs As GefObjectExpressions
    Dim oCimObjExpr As GefObjectExpression
    Set oCimObj = CimGetObject
    Set oCimObjExprs = oCimObj.Expressions
    For i = 0 To oCimObjExprs.Count - 1
        Set oCimObjExpr = oCimObjExprs.Item(i)
        MsgBox "Expression number " & i + 1 & " is " & """" & oCimObjExpr.Expression & """"
    Next i
End Sub