Use of Sheet CodeNames to Select Sheet in Different Workbook
I've never gotten that to work either. The Worksheets method appears to do
what you need.
MsgBox wb.Worksheets(Sheet1.Index).Name
"Randy" wrote:
Thanks, Steve. Unfortunately, neither of these methods will work for
me. I am specifically trying to avoid using the "tab name" (e.g.
"Sheet1") so that the user can remain free to change the sheet names at
their discretion.
The Sheets(1) method doesn't work for me since that method requires
that the sheet be the first sheet in the stack of sheets. If the user
moves the sheet, then Sheet(1) refers to a different sheet then I am
intending. If my understanding of this is incorrect, let me know.
Any other takers on this question?
|