bottom
Great ExcelTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > ExcelTips Home > Worksheets > Protecting Worksheets > Locking Worksheet Names

Locking Worksheet Names

Summary: Want to stop other people from changing the names of your worksheets? You can provide the desired safeguard by using the workbook protection features built into Excel. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

If you are developing workbooks for others to use, you may want your worksheets to retain whatever names you give them. Excel normally allows users to change worksheet names, as desired. If you don't want them to change, the only way to prevent it is to lock the workbook. You can take these steps if you are using a version of Excel prior to Excel 2007:

  1. Display the Protect Workbook dialog box. (Click here to see a related figure.) Do this by choosing Tools | Protection | Protect Workbook. (In Excel 2007 display the Protect Structure and Windows dialog box by displaying the Review tab of the ribbon and clicking Protect Workbook in the Changes group.)
  2. Make sure that the Structure check box is selected.
  3. Enter a password in the Password box.
  4. Click on OK. Excel displays the Confirm Password dialog box, prompting you to reenter the password.
  5. Reenter the password and click on OK.

The user can no longer make changes to the names of the worksheet tabs, nor to anything else that affects the structure of the workbook. (For instance, they cannot enter new worksheets or delete existing ones.)

If you want to protect the workbook under the control of a macro, then you can use this code:

ActiveWorkbook.Protect Password:="MyPassword", Structure:=True

All you need to do is provide password you want to use in place of the "MyPassword" example.

Tip #2689 applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007


Got the Time? Understanding the ins and outs of working with times and dates can be confusing. Remove the confusion--ExcelTips: Times and Dates is an invaluable resource for learning how best to work with times and dates.
 
Check out ExcelTips: Times and Dates today!

Helpful Links

Ask an Excel Question
Make a Comment

Tips.Net Home

ExcelTips FAQ
ExcelTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

 

Great Info!

Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)