Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 69
Default Workbook/worksheets protected- can I allow tab re-naming?

Hi:

I protected my workbook so that people cannot delete sheets. However, I want
to allow them to re-name sheets. The way that I did it doesn't seem to allow
both. Can you help? thank you!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Workbook/worksheets protected- can I allow tab re-naming?

Something similar to this not too well error-trapped macro.

Sub rename_sheet()
On Error GoTo endit
newname = InputBox("type a name")
If newname < "" Then
ActiveWorkbook.Unprotect
ActiveSheet.Name = newname
End If
ActiveWorkbook.Protect
Exit Sub
endit:
MsgBox "not a valid name. try again"
ActiveWorkbook.Protect
End Sub


Gord Dibben MS Excel MVP

On Sun, 20 Jul 2008 09:29:12 -0700, Roady
wrote:

Hi:

I protected my workbook so that people cannot delete sheets. However, I want
to allow them to re-name sheets. The way that I did it doesn't seem to allow
both. Can you help? thank you!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 69
Default Workbook/worksheets protected- can I allow tab re-naming?

Thank you, that works great! However, is there anyway to alter the verbiage
in the pop up box that appears when the user tries to click on the tab
directly to rename it. Right now, it defaults to saying, "workbook is
protected and cannot be changed". I would like to be able to have it say
something like, "If you wish to re-name the tab, please use macro button
located on top right of worksheet"

Thanks again!
R

"Gord Dibben" wrote:

Something similar to this not too well error-trapped macro.

Sub rename_sheet()
On Error GoTo endit
newname = InputBox("type a name")
If newname < "" Then
ActiveWorkbook.Unprotect
ActiveSheet.Name = newname
End If
ActiveWorkbook.Protect
Exit Sub
endit:
MsgBox "not a valid name. try again"
ActiveWorkbook.Protect
End Sub


Gord Dibben MS Excel MVP

On Sun, 20 Jul 2008 09:29:12 -0700, Roady
wrote:

Hi:

I protected my workbook so that people cannot delete sheets. However, I want
to allow them to re-name sheets. The way that I did it doesn't seem to allow
both. Can you help? thank you!



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
Saving a Workbook where the worksheets are protected liz25mc Excel Worksheet Functions 0 June 25th 07 04:46 PM
Naming new worksheets paz24 Excel Discussion (Misc queries) 0 February 1st 06 11:46 AM
Naming Worksheets LIAMT Excel Worksheet Functions 1 August 21st 05 02:41 PM
Naming worksheets... tojo107 Excel Discussion (Misc queries) 3 April 7th 05 07:29 PM
naming worksheets Shooter Excel Worksheet Functions 1 December 3rd 04 04:09 PM


All times are GMT +1. The time now is 05:47 PM.

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"