Use of Sheet CodeNames to Select Sheet in Different Workbook
Sorry Steve - I replied to the wrong post. I meant to reply to Randy that
I've never gotten the syntax
Wb.Sheet1.Name
to work (although I've always thought that it should).
"STEVE BELL" wrote:
How about this.
In this one wsn = the codename (the name shown in VBA)
This stays the same no matter what the tab name is...
Dim ws As Worksheet, x, wsn As String
For Each ws In ActiveWorkbook.Worksheets
wsn = ws.CodeName
Next
--
steveB
Remove "AYN" from email to respond
"Randy" wrote in message
oups.com...
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?
|