View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Nick Hodge
 
Posts: n/a
Default Locking down a tab

Are you trying to stop the tab being renamed?

If so, you could check it with the worksheet_deactivate event like so

Private Sub Worksheet_Deactivate()
If Me.Name < "Test" Then
MsgBox "You cannot rename this sheet to " & Me.Name & " renaming to
Test...", vbOKOnly
Me.Name = "Test"
End If
End Sub

If you try to exit the sheet with the name not set to Test, it will stop you
and rename it.

Deactivate may not be the correct event or the only one, but it may give you
a start

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"GGanders" wrote in
message ...

I know you can pass protect a spreadsheet but does anyone know a way I
can pass protect a tab instead of the entire spreadsheet?


--
GGanders
------------------------------------------------------------------------
GGanders's Profile:
http://www.excelforum.com/member.php...o&userid=35422
View this thread: http://www.excelforum.com/showthread...hreadid=551883