Forum Discussion
sastowe
14 years agoSuper Contributor
I might place the object names in an array.
sObjName = "Name1|Name2|Name3|Name4"
asObjName = Split(sObjName, "|")
Then you can loop through the array
For i = 0 to UBound(asObjName)
set obj = something.VBObject(asObjName(i))
obj.Click
Next
I have not tried this, but if I wanted to do this, I would bark up this tree to start.
sObjName = "Name1|Name2|Name3|Name4"
asObjName = Split(sObjName, "|")
Then you can loop through the array
For i = 0 to UBound(asObjName)
set obj = something.VBObject(asObjName(i))
obj.Click
Next
I have not tried this, but if I wanted to do this, I would bark up this tree to start.