Let's say that I have 3 Sheets named Sheet1, Player1 and Player2 (renaming the tab at the bottom).
This code Works:
Dim Num
Dim Players(1) as Variant
Players(0) = "Player1"
Players(1) = "Player2"
For Num = 0 To 1
Sheets(Players(Num)).Select
-- actions --
Next Num
But if one day I change the tab "Player1" into "Michael Jordan" the code above will not work.
What I need is to use the CodeName of the Sheet, the value in (name) as specified in http://www.ozgrid.com/VBA/excel-vba-sheet-names.htm
I don't need all the sheets in a workbook but just some of them, something like
For Num = 0 To 1
PlayerX.Select
-- actions --
Next Num
where PlayerX is an sheet object (required by Select)
Thanx
Bookmarks