Disabling sheet rename

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Good morning orit

Tools > Protection > Protect Workbook should do the trick.

HTH

DominicB
 
Upvote 0
Tools > Protection > Protect Workbook.

Enable the options to protect the structure, then set a password.
Users will be unable to change sheet names, insert or remove them, without first entering the password.

Denis
 
Upvote 0
Thanks a lot

Is there a way to disable renaming specific sheets only using vba?

Thanks
 
Upvote 0
You can also disable sheet renaming by protecting each sheet that you want left alone. This also locks cells, but the following code will lock only cells with formulas and leave others free for data entry.
To use, do the following:
1. Press Alt+F11 to go to the macro editor
2. Insert > Module and paste the following code
3. Close the VBA editor and return to Excel
4. Select a sheet, press Alt+F8 and double-click Protect Sheet

5. To unlock a sheet, press Alt+F8 and double-click Unprotect sheet instead.

Code:
Option Explicit

Sub ProtectSheet()
Cells.Select
With Selection
    .Locked = False
    .SpecialCells(xlCellTypeFormulas, 23).Select
    .Locked = True
End With
Range("A1").Select
ActiveSheet.Protect "password"
End Sub

Sub UnprotectSheet()
ActiveSheet.Unprotect "password"
End Sub
If you want to use a different password, change it in the code -- but make sure that the sheet is unlocked first, and the passwords match in both subroutines.

Denis
 
Upvote 0

Forum statistics

Threads
1,215,500
Messages
6,125,168
Members
449,211
Latest member
ykrcory

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