GefObjectVariables.Add (method)

Adds a new variable to the object.
Syntax: Set GefObjectVariable = object.Add ( Name, Value )
Name As String - The name of the new variable.
Optional Value As String - The value of the new variable.
Description: If the named variable already exists, this method will update the value.


Sub GefObjectVariables_Add()
    Dim oCimObj As GefObject
    Dim oCimObjVars As GefObjectVariables
    Dim oCimObjVar As GefObjectVariable
    Set oCimObj = CimGetObject
    Set oCimObjVars = oCimObj.Variables
    Set oCimObjVar = oCimObjVars.Add("NewVariable", 0)
End Sub