View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Code names for excel sheets

No, Summary is the codename in this example. You cannot reference a sheet in
another workbook by its code name so I gave you code to retrieve the Excel
sheet name from the code name, and then use that.

--
__________________________________
HTH

Bob

"alan82" wrote in message
...
Apologies, I have not explained my problem clearly....

This method still requires that I make some static reference to the
sheet name.

I can just use:

Sheets("Summary").select

instead. The reason that i want to use the code name is because I have
other sheets that show information corresponding to a date. The sheet
name will change according to date, but the code name will not. e.g. I
have the following codenames for sheets.

Summary
Yr1
Yr2
Yr2

The actual name that is displayed on the tab in excel will vary for
sheets Yr1, Yr2, Yr3. Hence I would like to avoid making a static
reference to the name... my code will not be dynamic in this case.

Can I retrieve the codename for a sheet without using the name that is
displayed on the sheets tab?