Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet name
Anybody know some event code I could use to execute should a user try to
change the name of a worksheet? I wrote a macro that won't work if it gets lost in the workbook (if someone changes the worksheet names) so I want to somehow protect the current names. I tried worksheet_change, but that only seems to execute if a cell in the worksheet is changed. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet name
If you protect the Workbook (structure option as a minimum) then the user
won't be able to rename, delete, add or change the order of sheets. -- Regards, Tom Ogilvy "xlcharlie" wrote in message ... Anybody know some event code I could use to execute should a user try to change the name of a worksheet? I wrote a macro that won't work if it gets lost in the workbook (if someone changes the worksheet names) so I want to somehow protect the current names. I tried worksheet_change, but that only seems to execute if a cell in the worksheet is changed. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet name
You could also use the code name of the worksheet. It's shown in the
Project Explorer to the left of the tab name (the one displayed on your worksheet) and in the Name property of the Properties window for the sheet. Originally both the tab and the code name are the same, e.g., "Sheet1." You can change the code name in the Name property in the Properties Window. It doesn't change if users change the tab name. Use the code name like this: Sheet1.Range("A1") = "test" For more info see VBA help for "CodeName Property." hth, Doug Glancy "xlcharlie" wrote in message ... Anybody know some event code I could use to execute should a user try to change the name of a worksheet? I wrote a macro that won't work if it gets lost in the workbook (if someone changes the worksheet names) so I want to somehow protect the current names. I tried worksheet_change, but that only seems to execute if a cell in the worksheet is changed. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatically appending newly added data on worksheet to a master list worksheet | Links and Linking in Excel | |||
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 | Excel Worksheet Functions | |||
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet | Excel Worksheet Functions | |||
I want in one worksheet to relatively link to/reference cells in another without changing the format of the current worksheet. | Excel Discussion (Misc queries) | |||
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet | Excel Programming |