I am using a FOR loop to go through up to 20 sheets, activating each so that I can print certain ranges on them.
I am using the VBA sheet names (Sheet1,Sheet2,Sheet3, etc) rather than the names on the tabs, because the tabs are named for company tickers. I would like to be able to write something like this:
for x=1 to 20
Sheet&x.activate
[Print sequence here]
next x
The problem is that Sheet&x does not work. In user forms, if I want to go through Checkbox1 to Checkbox20, and check them all, I can use Controls, e.g.:
for x to 20
Controls("Checkbox"&x).value=TRUE
next x
So I am looking for a similar thing like Controls but for sheets.
Any ideas?
Bookmarks