How to Password-Protect Hidden Sheets in Excel (3 Methods)

As an Excel user, you can hide your worksheet. But if you don’t hide it with a password, others can unhide the worksheet easily. That’s why a password protection hidden sheet in Excel is essential. This article will cover how to password protect hidden sheets in Excel. I hope you enjoy this article thoroughly and gain some valuable knowledge.

To password protect hidden sheets in Excel, we have found three different approaches. All three methods are equally useful and very easy to digest. These methods include VBA and some Excel commands. To show these methods effectively, we took a dataset that contains some stores and their incomes, expenses, and profits.

Password Protect Hidden Sheets in Excel


1. Using the Review Tab to Password-Protect Hidden Sheets in Excel

Firstly, we can protect our hidden sheets with passwords from the review tab. Here, we can set our preferred password to protect the worksheet. Without applying this password, no one can open and change our dataset. To do this, follow the following steps carefully.

Steps

  • First of all, you can hide the worksheet by right-clicking on it. Here, we want to hide a sheet named Protect Workbook. When you right-click on the sheet, an options menu will appear. From there, select the Hide option.

Password Protect Hidden Sheets in Excel

  • This will hide your sheet your the Excel workbook.

  • If you don’t protect your worksheet with a password, you can unhide this by just right-clicking on it.

  • But that is not what we want to do. To protect your worksheet with a password, first, you need to hide your sheet by using the first step. Then go to the Review tab in the ribbon and select Protect Workbook from Protect group.

Password Protect Hidden Sheets in Excel

  • After clicking the Protect Workbook option, a Protect Structure and Windows dialog box will appear where you can write your preferred password and click on OK.

  • A Confirm Password dialog box will occur. Here, rewrite your password and click on OK.

  • This will eventually protect your sheet with a password. Now, if you right-click on the sheet, there will be no unhide option to choose.

Password Protect Hidden Sheets in Excel

  • To have this unhide option, you need to go to the Review tab in the ribbon again and select Protect Workbook from Protect group.

  • After clicking on it, Unprotect Workbook dialog box will appear where you need to put the exact password to unprotect the sheet and click on OK. Otherwise, you will fail to unprotect the worksheet.

Password Protect Hidden Sheets in Excel

Read More: How to Protect Excel Sheet with Password


2. Applying VeryHidden Function to Password-Protect Hidden Sheets

We can use VeryHidden Function to hide our Excel sheets. After hiding the sheet, we can apply the password to protect it. To do this method, follow the following steps carefully.

Steps

  • Press Alt+F11′ to open the Developer tab. You can open it by customizing the ribbon.

  • Next, in the Visual Basic, go to the View tab and select Project Explorer and Properties Windows respectively.

Password Protect Hidden Sheets in Excel

  • Now, in the VBAProject, select the sheet that you want to hide by using VeryHidden.

  • The selected sheet’s properties will appear at the bottom. Change the Visible option to xlSheetVeryHidden from the drop-down option.

Password Protect Hidden Sheets Using VeryHidden

  • This will automatically hide your selected worksheet. But anyone can unhide this with ease. To stop this, you need to protect this with a password. First, go to the Insert tab and select Module.

  • A blank Module window will appear. Next, go to the Tools tab and select VBAProject Properties.

Password Protect Hidden Sheets Using VeryHidden

  • Project Properties dialog box will appear. Select Protection. In the Lock Project option, check the Lock project for viewing. Next, set a password and confirm it by rewriting it. Finally, click on OK.

Password Protect Hidden Sheets Using VeryHidden

  • Close the Visual Basic. Now save the workbook as Excel Macro-Enabled Workbook and click on Save.

  • Now, if you open the Visual Basic, you need to write the password otherwise you can’t unhide the sheet.

Password Protect Hidden Sheets in Excel

Read More: How to Protect an Excel Sheet Except for Certain Cells


3. Using Excel VBA Code to Password-Protect Hidden Sheets

We can Protect the hidden sheet with a password using a VBA code. In this method, we can apply a code through which the sheet will be hidden and then apply a password to protect it. To do this method, you can follow the following steps.

Steps

  • Press Alt+F11′ to open the Developer tab. You can open it by customizing the ribbon.

  • Next, go to the Insert tab and select Module.

  • A Module code window will occur. In there, copy the following code and paste it.
Sub Protect_and_HideSheet()
 Sheets("VBA").Visible = xlSheetVeryHidden
End Sub
  • Now, close the Visual Basic code window.
  • Next, go to the View tab in the ribbon and select Macros.

  • A Macro dialog box will appear. Select the Protect_and_HideSheet option from the Macro Name and click on Run.

Embedding VBA Code to Password Protect Hidden Sheets in Excel

  • This will automatically hide your sheet from the Excel workbook. But the problem is that anyone can unhide this easily. So, to protect your sheet with a password in Excel, you need to go to the Visual basic again.
  • Next, open a Module window where you write your code then go to the Tools and select VBAProject Properties.

Embedding VBA Code to Password Protect Hidden Sheets in Excel

  • Project Properties dialog box will appear. Select Protection. In the Lock Project option, check the Lock project for viewing. Next, set a password and confirm it by rewriting it. Finally, click on OK.

Embedding VBA Code to Password Protect Hidden Sheets in Excel

  • Close the Visual Basic. Now save the workbook as Excel Macro-Enabled Workbook and click on Save.

  • Now, if you open the Visual Basic, you need to write the password otherwise you can’t unhide the sheet.

Password Protect Hidden Sheets in Ex


Download Practice Workbook

Download this Practice workbook.


Conclusion

To password protect hidden sheets in Excel, we have shown three useful ways through which you can do the work. All three methods including the VBA code are fairly easy to understand. If you have any questions, feel free to ask in the comment section.


Related Articles


<< Go Back to Protect Excel Sheet | Excel Protect | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Durjoy Paul
Durjoy Paul

Durjoy Kumar, with a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, is a dedicated contributor to the ExcelDemy project. His substantial contributions include crafting numerous articles and demonstrating expertise in Excel and VBA. Durjoy adeptly automates Excel challenges using VBA macros, offering valuable solutions for user interface challenges. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel, SPSS, C, C++, C#, JavaScript, Python Web Scraping, Data Entry... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo