Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protecting Worksheet Names
I would like VBA code to protect a worksheet from being RENAMED - pls don't
confuse this and tell me how to protect a worksheet as I already know that. My application works so long as users don't go changing sheet names. Can anyone help me? Thnx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protecting Worksheet Names
Hi Hoppermr,
My application works so long as users don't go changing sheet names. Can anyone help me? Try changing your code to use the sheet code name instead of the sheet name. If the user changes the sheet name, the code name remains unaltered. --- Regards, Norman "hoppermr" wrote in message ... I would like VBA code to protect a worksheet from being RENAMED - pls don't confuse this and tell me how to protect a worksheet as I already know that. My application works so long as users don't go changing sheet names. Can anyone help me? Thnx |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protecting Worksheet Names
Hi
Instead protecting worksheet, have you tried to protect workbook structure? It looks like you need just this! (ToolsProtectionProtect Workbook, and check 'Structure') -- Arvi Laanemets ( My real mail address: arvil<attarkon.ee ) "hoppermr" wrote in message ... I would like VBA code to protect a worksheet from being RENAMED - pls don't confuse this and tell me how to protect a worksheet as I already know that. My application works so long as users don't go changing sheet names. Can anyone help me? Thnx |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protecting Worksheet Names
use the sheet object name.
OPen a new workbook, change the tab name of a sheet to say "Data" Now look in the IDE for the Project Explorer (Ctrl+R). You'll seesomething like Sheet1(Data) select it and view the properties window (F4) in Properties you'll see the property called (name) which is the object name, eg Sheet1 and you'll see the Name property has a value Data, the sheet's name. change t he object's (name) property to say shData now, in your code, instead of using, for example WITH Worksheets("Data") use WITH shData It won't matter if your user changes the tab name (sheet name), the object name can only be changed through the IDE. "hoppermr" wrote: I would like VBA code to protect a worksheet from being RENAMED - pls don't confuse this and tell me how to protect a worksheet as I already know that. My application works so long as users don't go changing sheet names. Can anyone help me? Thnx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
protecting worksheet tab names | Excel Discussion (Misc queries) | |||
Protecting Range Names | Excel Discussion (Misc queries) | |||
Changing VB Component Names to match Worksheet names using VBE | Excel Programming | |||
return all worksheet tab names and chart sheet tab names in report - an example | Excel Programming |