All,
I've created an Array of worksheet 'Names', to loop through them.
Instead I'd like to use the 'CodeName' so if the user changes the
name on the tab, the code does not break..
Any suggestions on how to do this?
The code: "ThisWorkbook.Sheets()" uses the index number or the name (on the tab)
How can I use the CodeName here? or will it also use the code name?
Thank you,
John,
In Annapolis.
I've created an Array of worksheet 'Names', to loop through them.
Instead I'd like to use the 'CodeName' so if the user changes the
name on the tab, the code does not break..
Any suggestions on how to do this?
Code:
Dim vWSArray as Variant, i as long
Dim ws as Worksheet
'- Create the Array --------------------
vWSArray = Array("01", "02", "03")
'-- Loop Through Array -----
For i = LBound(vWSArray) to UBound(vWSArray)
Set ws = ThisWorkbook.Sheets(vWSArray(i))
With ws
.
.
End With
Next i
The code: "ThisWorkbook.Sheets()" uses the index number or the name (on the tab)
How can I use the CodeName here? or will it also use the code name?
Thank you,
John,
In Annapolis.