Variable.ActivateSubItem



ActivateSubItem(vSubItem As Variant) As Boolean

Parameters

vSubItem As Variant
Array or structure element can be selected via name (string) or via number (counting starts at 0).
ED
avaliable
RT
not used

Remarks

This method activates an array or a structure element. Returns true when element has been activated, false if no change has been done.

Sample:


Sub ActiveSubItem()

Dim zVariables As Variables 'Object from type Variables
Dim zVariable As Variable   'Child object from type Variables
Dim actSubItem As Boolean   'Status variable

'Fill the objects
Set zVariables = MyWorkspace.ActiveDocument.Variables
'Array variable called "array" with some elements should be available
Set zVariable = zVariables.Item("array")
'Element "array[2]" is activated
actSubItem = zVariable.ActivateSubItem("array[2]")
Debug.Print "Activated = " & actSubItem

End Sub


See Also

Variable