ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protecting an Excel worksheet from being renamed (https://www.excelbanter.com/excel-programming/417325-protecting-excel-worksheet-being-renamed.html)

JAC

Protecting an Excel worksheet from being renamed
 
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!

Risky Dave

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!


Ron de Bruin

Protecting an Excel worksheet from being renamed
 
Hi Jac

Protect the workbook


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JAC" wrote in message ...
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!


Charles Williams

Protecting an Excel worksheet from being renamed
 
If your reason for wanting this is that renaming worksheets stops your VBA
code working try using Worksheet.codename in your code rather than
Worksheet.Name.

Charles
__________________________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"JAC" wrote in message
...
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!





All times are GMT +1. The time now is 03:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com