Looping A Variable Used Within An Object Name
Hi guys,
Simple bit of code:
For c = 2 To Nofcharts
With Worksheets(SheetName)
Set ZoomArray(c) = .Zoom & c
End With
Next c
What I want to do is to be able to loop through a number of objects
(they are toggle buttons) called Zoom2, Zoom3, Zoom4 etc. Obviously
the code above doesn't work, so how can I modify it so that it is able
to set e.g. ZoomArray(5) = .Zoom5
Thanks and regards,
Tom
|