Dynamically reference worksheet code name
Actually, that's more like what I was looking for. Thanks.
"Jim Thomlinson" wrote:
Here is a solution that I have used. It is a little different from what you
asked but it works...
Sub test()
Dim wks As Worksheet
For Each wks In Worksheets
If Left(wks.CodeName, 4) = "Test" Then MsgBox wks.CodeName
Next wks
End Sub
--
HTH...
Jim Thomlinson
"Barb Reinhardt" wrote:
I'd like to do something like the following
For i = 1 to 10
Set aws = "Test" & i 'Test1-test10 are worksheet code names
'perform actions on aws
next i
How do I do this?
Thanks,
Barb Reinhardt
|