View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Risky Dave Risky Dave is offline
external usenet poster
 
Posts: 161
Default Protecting an Excel worksheet from being renamed

Don't know if it's the most efficient way, but I have achieved this by:

1) turning off the ribbon (this is in Office '07, there is a similar
capablity with earlier versions);
Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"

2) disable right-click functionality
Private Sub Workbook_Open()
Application.CommandBars("Ply").Enabled = False

3) lock and protect all sheets

I'm no programmer, but was able to do build a VBA solution by searching
through these forums for similar problems & solutions and adapting them.

HTH

Dave


"JAC" wrote:

Does anyone know how I can protect a worksheet from being renamed by
the user without stopping him/her from amending (or adding) values to
that worksheet?

All I want to do is to stop renaming!