Note: The other languages of the website are Google-translated. Back to English

How to prevent from changing sheet name in Excel?

In Excel, you can change the sheet name by double clicking the tab name quickly and easily, but, sometimes, you wouldn’t allow others to change the sheet name. In this case, how could you prevent from changing the sheet name in a workbook?

Prevent from changing sheet name by protecting workbook

Prevent from changing sheet name by using VBA code

arrow blue right bubble Prevent from changing sheet name by protecting workbook

If you apply the Protect Workbook function, all of the sheet names will not be changed, please do as follows:

1. Click Review > Protect Workbook, see screenshot:

doc prevent changing sheet name 1

2. In the Protect Structure and Windows dialog box, enter the password, check the Structure under Protect workbook for, and then confirm the password again, see screenshot:

doc prevent changing sheet name 2

3. Then click OK button, now, when you double click to change the sheet name, a warning message will pop out to remind you the sheet name cannot be changed, see screenshot:

doc prevent changing sheet name 3

Note: With this feature, except changing sheet name, other functions such as inserting sheet, delete sheet, hide sheet…are disabled as well.

doc prevent changing sheet name 4

arrow blue right bubble Prevent from changing sheet name by using VBA code

Here is a VBA code also can help you to prevent a specific sheet name being changed. Please do as this:

1. Right click the sheet tab that you want to protect the sheet name not to be changed, and then choose View Code from the context menu, in the popped out Microsoft Visual Basic for Applications window, please copy and paste the following code into the blank Module:

VBA code: Prevent from changing sheet name:

Private Sub worksheet_SelectionChange(ByVal Target As Excel.Range)
'Updateby Extendoffice
If ActiveSheet.Name <> "Master" Then
ActiveSheet.Name = "Master"
End If
End Sub

doc prevent changing sheet name 5

Note: In the above code, Master is the sheet name which you want to protect from being changed.

2. Then save and close the code, from now on, when you rename this specific sheet name, it will be restored to the original one at once. See screenshot:

doc prevent changing sheet name 6

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, there!

Use of vba code to prevent renaming sheets is fantastic. However, it shows the message: "That name is already taken. Try a different one." if hyperlink to a next sheet in the same workbook is clicked.

Could you help, please?
This comment was minimized by the moderator on the site
Hello Acharya ,
The warning message you remind is the default message when there is same name in the workbook, it can't be avoided.
Thank you!
This comment was minimized by the moderator on the site
Hi i had one query
I had given sum if formula where as the sheet name is "Charge" and where i had given formula in that particular sheet i want to replace formula in AH row so when i am replacing formula from ROW -AR to AH the sheet name reflecting in formula is also changing how should i replace
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations