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
|