Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using the Excel generic worksheet names instead of user-given names in code Paul Excel Discussion (Misc queries) 5 June 26th 09 08:44 PM
protecting worksheet tab names Paul Excel Discussion (Misc queries) 4 June 23rd 09 03:40 AM
Protecting Range Names Frederick Chow Excel Discussion (Misc queries) 4 March 8th 06 12:09 PM
Changing VB Component Names to match Worksheet names using VBE Philip Excel Programming 1 April 12th 05 05:37 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"