Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to programmatically access sheets in a workbook by code name
Hi Again
I want to be able to refer to worksheets in a workbook programmatically that way i wont have to worry if endusers will change the name of the worksheet. Right now i'm using : ThisWorkbook.Worksheets("Sheet"1), but if i "Sheet1" has a code name of 'secret', how can i go about getting a Worksheet reference using that code name? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to programmatically access sheets in a workbook by code name
dim s as worksheet
set s=secret Or (better) just use "secret" directly as in: secret.Activate Tim. "Bing" wrote in message ... Hi Again I want to be able to refer to worksheets in a workbook programmatically that way i wont have to worry if endusers will change the name of the worksheet. Right now i'm using : ThisWorkbook.Worksheets("Sheet"1), but if i "Sheet1" has a code name of 'secret', how can i go about getting a Worksheet reference using that code name? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sharing a Workbook But Restricting Access to Certain Sheets | Excel Discussion (Misc queries) | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
access sheets in another workbook | Excel Programming | |||
Code to make sheets in a workbook visible | Excel Programming | |||
How to hide sheets and VBA code in my Excel workbook? | Excel Programming |