lock worksheet name

orsm6

Active Member
Joined
Oct 3, 2012
Messages
496
Office Version
  1. 365
Platform
  1. Windows
I have a workbook that contains easily 50 - 100 sheets. How can I stop anyone from changing any of the worksheets names?
BUT how can I do this without using the Protect Workbook option in toolbar. and hopefully without a separate macro for every single sheet.

TIA.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Protect Workbook for Structure is the textbook way to do this. Why do you need to avoid this?

The only other way is by using VBA, and there is no built-in way to capture a sheet name change so it would be a little complicated. The code would have to keep some sort of table of sheet names and if there was a change to a sheet, check to see if that change was to rename it. On the upside you would just need one Sub in ThisWorkbook, not a separate macro for each sheet.
 
Upvote 0
Solution
Protect Workbook for Structure is the textbook way to do this. Why do you need to avoid this?

The only other way is by using VBA, and there is no built-in way to capture a sheet name change so it would be a little complicated. The code would have to keep some sort of table of sheet names and if there was a change to a sheet, check to see if that change was to rename it. On the upside you would just need one Sub in ThisWorkbook, not a separate macro for each sheet.
Have been thinking about it, and agree that you're right just to use that option to use protect structure. I had thought enabling that would prevent other functions, but it seems that it doesn't.

thanks for your reply and feedback :)
 
Upvote 0
Protect workbook = prevent other users from viewing hidden worksheets, adding, deleting, hiding, moving, and renaming worksheets.

@orsm6 If you feel that solution was not your desired intention, you can use macro code to toggle off the 'delete' option of a worksheet, and eliminate the renaming of a worksheet.
 
Upvote 0
Protect workbook = prevent other users from viewing hidden worksheets, adding, deleting, hiding, moving, and renaming worksheets.

@orsm6 If you feel that solution was not your desired intention, you can use macro code to toggle off the 'delete' option of a worksheet, and eliminate the renaming of a worksheet.
Ta mate - i think for now it has done enough. If people keep leaving the workbook unprotected then i might look at a code.

Would rather not have to protect everything by passwords, can be a pain to remember them lol
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top