How to Lock a Tab in Excel From Being Viewed
In this article
To lock a tab in Excel from being viewed, you must hide the sheet and then protect the workbook structure so users cannot unhide it. This is done through the Hide command on the sheet tab, followed by Protect Workbook in the Review tab, which requires a password to unhide the sheet.
Why Hiding a Sheet Isn't Enough
Simply right-clicking a tab and choosing Hide removes it from view, but any user can right-click any visible tab, select Unhide, and bring it back instantly. The hidden sheet remains fully accessible to anyone with the file open. To truly prevent viewing, you must combine hiding with workbook protection—this disables the Unhide option until the correct password is entered. Without that second step, hiding is only a cosmetic change, not a security measure.
Step-by-Step: Hide and Protect a Sheet
- Open your Excel workbook and click on the tab of the sheet you want to lock from view.
- Right-click the tab and select Hide. The sheet disappears from the tab bar.
- Go to the Review tab on the ribbon.
- Click Protect Workbook (not Protect Sheet). In some versions it's labeled Protect Workbook with a padlock icon.
- In the dialog that opens, check the box for Structure (it should be checked by default).
- Enter a password in the Password field. This password will be required to unhide the sheet or to unprotect the workbook.
- Click OK, re-enter the password to confirm, and save the file.
Now when a user right-clicks any tab, the Unhide option is grayed out. To view the hidden sheet later, you must go to Review → Protect Workbook again, enter the password, and then use Unhide from the right-click menu.
What the Protection Actually Does
Workbook protection with the Structure option locks the entire workbook's layout: it prevents users from adding, moving, deleting, renaming, or unhiding sheets. It does not encrypt the file or prevent someone from opening it. The hidden sheet's data is still present in the file, and a determined user with technical skills could bypass the protection by editing the file's XML or using a hex editor. For casual sharing, this method is effective; for sensitive data, consider stronger measures like file-level encryption (File → Info → Protect Workbook → Encrypt with Password) or saving as a read-only file.
How to Unhide a Sheet Later
To restore the hidden sheet, you need to unprotect the workbook first. Go to Review → Protect Workbook and click it again (it will be highlighted). Enter the password when prompted. Then right-click any visible tab, choose Unhide, select the sheet from the list, and click OK. The sheet returns to its original position in the tab bar. If you forget the password, there is no official way to recover it—Microsoft does not provide a password recovery tool for workbook protection. Always store passwords in a safe place.
Comparing Sheet Protection vs. Workbook Protection
Many users confuse Protect Sheet with Protect Workbook. They serve different purposes:
- Protect Sheet (Review → Protect Sheet) locks cells and prevents editing of a visible sheet. It does nothing to hide the sheet.
- Protect Workbook (Review → Protect Workbook) locks the structure—including the ability to unhide sheets. This is the only built-in way to prevent a hidden sheet from being viewed.
For a truly hidden sheet, you need both: hide the sheet, then protect the workbook. If you only protect the sheet, users can still unhide it. If you only hide the sheet, users can unhide it without any password. The combination is the standard approach.
Common Problems and Workarounds
One frequent issue is that after protecting the workbook, the user can still see the hidden sheet's name in the Unhide dialog if they manage to unprotect it. That's expected—the protection is the gate. Another problem is that some users try to hide a sheet but then forget the password. There is no built-in recovery; you must remember it. Also, note that workbook protection does not prevent someone from copying the entire file and working on a copy—they still can't unhide the sheet without the password, but they could potentially extract data using other tools. If you need to share the file with multiple people but keep one sheet secret, this method works, but be aware that it is not encryption.
Alternatives for Stronger Privacy
If you need to ensure that no one can view a sheet's contents, consider these alternatives:
- Encrypt the entire workbook with a password (File → Info → Protect Workbook → Encrypt with Password). This requires a password to even open the file, making it much harder to access hidden data.
- Move the sensitive data to a separate file and link to it. This way, the sensitive sheet isn't in the shared workbook at all.
- Use Excel's “Very Hidden” property via VBA. Setting the sheet's Visible property to xlSheetVeryHidden hides it from the Unhide dialog entirely, but it still requires VBA and can be reversed by someone who knows VBA. It also requires the workbook to be macro-enabled.
For most users, the hide + protect workbook method is sufficient. For sensitive personal or financial data, encryption is the better choice.
Frequently Asked Questions
Can I lock a tab so it can't be viewed without a password?
Yes, by hiding the sheet and then protecting the workbook structure with a password. The Unhide option will be grayed out until the correct password is entered.
Why is the Unhide option grayed out even after I unhide?
That happens when the workbook is still protected. Go to Review → Protect Workbook and unprotect it by entering the password, then you can unhide the sheet.
Does hiding a sheet remove it from the file size?
No, the data remains in the file. Hiding only changes the visibility. The file size is not reduced, and the data can be recovered by advanced users.
Can I hide a sheet and still allow other users to edit visible sheets?
Yes, workbook protection with Structure only locks the sheet tabs, not the cell contents. Users can still edit visible sheets unless you also protect those sheets individually.
What if I forget the password to unprotect the workbook?
There is no built-in way to recover it. You may need to use third-party recovery tools, but they are not guaranteed to work and may violate your organization's policies. Always keep a copy of the password in a secure location.