Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sheet name change


Is there a way to detect sheet name changes or prevent user from
changing the name of a sheet? Thanks.


--
spacecityguy
------------------------------------------------------------------------
spacecityguy's Profile: http://www.excelforum.com/member.php...o&userid=11060
View this thread: http://www.excelforum.com/showthread...hreadid=504683

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Sheet name change

You could protect the workbook.
Alternatively, if the problem with the changing sheet names is related to
referencing the sheets in VBA, use the sheet codename instead.

Eg:

Sheet1.Range("A1")
instead of
ThisWorkbook.Sheets("Sheet1").Range("A1")

Tim.

--
Tim Williams
Palo Alto, CA


"spacecityguy"
wrote in message
news:spacecityguy.225uon_1138142404.8435@excelforu m-nospam.com...

Is there a way to detect sheet name changes or prevent user from
changing the name of a sheet? Thanks.


--
spacecityguy
------------------------------------------------------------------------
spacecityguy's Profile:

http://www.excelforum.com/member.php...o&userid=11060
View this thread: http://www.excelforum.com/showthread...hreadid=504683



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sheet name change


I can't protect the workbook becuase I've to allow the user to input
into my file. I do use the sheet's codename in my code, and the problem
I have is with something that Excel may not expect me to do. I tried to
write a "patch" utility in VBA that will replace a sheet in a file
(template file) that has VBA code. Since I can't change the sheet's
codename, my code in the template file must refer to the sheet by its
"given" name (otherwise my code in the template file will break after
my patch deletes the sheet). But when I use the "given" name, I've to
worry about the user changing it. Thanks again.


--
spacecityguy
------------------------------------------------------------------------
spacecityguy's Profile: http://www.excelforum.com/member.php...o&userid=11060
View this thread: http://www.excelforum.com/showthread...hreadid=504683

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Sheet name change

I *think* you can change the sheet's codename using VBA.

If not, you might consider adding a hidden name to the inserted sheet and
then identify it by checking each sheet for the name.


Tim

--
Tim Williams
Palo Alto, CA


"spacecityguy"
wrote in message
news:spacecityguy.22baqz_1138396502.8767@excelforu m-nospam.com...

I can't protect the workbook becuase I've to allow the user to input
into my file. I do use the sheet's codename in my code, and the problem
I have is with something that Excel may not expect me to do. I tried to
write a "patch" utility in VBA that will replace a sheet in a file
(template file) that has VBA code. Since I can't change the sheet's
codename, my code in the template file must refer to the sheet by its
"given" name (otherwise my code in the template file will break after
my patch deletes the sheet). But when I use the "given" name, I've to
worry about the user changing it. Thanks again.


--
spacecityguy
------------------------------------------------------------------------
spacecityguy's Profile:

http://www.excelforum.com/member.php...o&userid=11060
View this thread: http://www.excelforum.com/showthread...hreadid=504683



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
how to change formula in shared sheet without loss of change histo DCE Excel Worksheet Functions 1 July 23rd 08 05:09 PM
Change workbook sheet reference using cell A1 to change a vairable Reed Excel Worksheet Functions 4 January 20th 05 07:15 PM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_582_] Excel Programming 0 October 6th 04 10:17 AM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_580_] Excel Programming 1 October 6th 04 09:30 AM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_574_] Excel Programming 1 October 5th 04 11:22 AM


All times are GMT +1. The time now is 08:11 PM.

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

About Us

"It's about Microsoft Excel"