|
ED
|
not used
|
RT
|
avaliable
|
Creates a new object OnlineVariable and returns it. The newly
created object is linked to the key strName. With this key the
object can be found in the collection at any time.
If an online variable with the same name already exists, Nothing is
returned. Therefore the newly created object should be checked on
Nothing in any case.
Dim WithEvents zOLV As OnlineVariable Const strOLV As String = "MyOnlineVariableContainer" 'initialize event on runtime startup Private Sub Project_Active() 'get object if already exists Set zOLV = thisProject.OnlineVariables.Item(strOLV) If zOLV Is Nothing Then 'if not exitst, create a new OnlineVariable container Set zOLV = thisProject.OnlineVariables.CreateOnlineVariables(strOLV) 'add variables to the container zOLV.Add "Variable1" zOLV.Add "Variable2" zOLV.Add "Variable3" End If 'activate 'VariableChange' event zOLV.Define End Sub
OnlineVariables, OnlineVariable