View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Rename Protected Worksheets

You could put a name change button on each sheet that calls this macro

Sub Button1_Click()

ActiveWorkbook.Unprotect
Message = "Enter new sheet name"
newname = InputBox(Message)
If newname = "" Then ActiveWorkbook.Protect: End
ActiveSheet.Name = newname
ActiveWorkbook.Protect
End Sub

Mike

"David" wrote:

I want to allow users to rename worksheets, but do nothing else to them.
I have programmed VBA with the "real" sheet number so that my code
referencing the sheets will not be affected.
The code protects the workbook with structure = true. Is there any way to
let users just change the names (they want to put technician names on the
sheets instead of a number assigned to each sheet). Thanks!