Hi, I am solving a problem.
I need a macro, that does certain operations on several sheets in workbook, but due to the actual sheet names changing based on specific projects and people adding new sheets, the only viable option is refering the the sheets by their codenames.
Can you loop through codenames in some easy way? I tried simply this
But I couldn't figure out, how to refer to the sheets themselves. Sadly no variation of
seems to work, although we are talking about sheets with codenames Sheet20...Sheet50
I either get "type mismatch" error message
Any idea?
Thanks
I need a macro, that does certain operations on several sheets in workbook, but due to the actual sheet names changing based on specific projects and people adding new sheets, the only viable option is refering the the sheets by their codenames.
Can you loop through codenames in some easy way? I tried simply this
Code:
Dim i as Integer
For i = 20 to 50
.....
Next
Code:
Sheet & i
seems to work, although we are talking about sheets with codenames Sheet20...Sheet50
I either get "type mismatch" error message
Any idea?
Thanks