GefObjectVariables.Item (read-only property)

Returns the specified variable.
Syntax: Set GefObjectVariable = object.Item ( IndexOrName )
Parameters:
Optional IndexOrName As VARIANT - The numeric index or a string containing the name of the variable. The numeric index ranges from 0 to Count-1.
Description: The Item method will return only variables defined for the particular GefObject. It does not return variables from any of the parent objects.

If the index or name does not correspond to a variable, the method returns Nothing.

Example:

Sub GefObjectVariables_Item()
    
    Dim oCimObj As GefObject
    Dim oCimObjVars As GefObjectVariables
    Dim oCimObjVar As GefObjectVariable
    
    Set oCimObj = CimGetObject
    Set oCimObjVars = oCimObj.Variables
    
    For i = 0 To oCimObjVars.Count - 1
        Set oCimObjVar = oCimObjVars.Item(i)
        MsgBox "Variable number " & i + 1 & " is " & """" & oCimObjVar.ID & """"
    Next i
    
End Sub