The AddGlobalVariable method adds a GlobalVariable object to the collection by name.
GlobalVariables.AddGlobalVariable Name, Value
Part | Description |
---|---|
GlobalVariables | Expression that evaluates to a GlobalVariables collection |
Name | String that is the name of the global variable |
Value | Variant that is the initial value of the global variable |
The AddGlobalVariable method does not return a reference to the GlobalVariable object it creates. You also can create the GlobalVariable object with the New method and then add it to the collection with the Add method.
HRESULT AddGlobalVariable(
BSTR Name,
VARIANT Value);