Hide or Protect a Tab in Excel - 2 ways

Add to Favorites

Two ways to hide worksheets in Excel.

Method 1

You can create a little macro to assign a password in order to access or open a tab in a workbook.

Right click on the tab > view code > paste this macro into the tab window:

Private Sub Worksheet_Activate()

ActiveSheet.Visible = True

pword = InputBox("Please Enter a Password", "Unhide Sheets")

If pword <> "Test" Then
    ActiveSheet.Visible = False
    ActiveSheet.Visible = True
End If

End Sub

Change Test in the above macro to whatever you want your password to be to display the tab.

Method 2

Right click the desired worksheet tab > click View Code

Or, hit Alt+F11 and then choose your worksheet from the left panel.

Select the View Properties window (hit F4 if you don't see it on the left side)

Look to the bottom where it says  'Visible' and select the option select 2 - xlsheetVeryHidden

Hit Alt+F11 to go back to Excel.

Now, you'll have to go through the above steps again in order to change this tab back to visible and to see it, However, most people will not know there is a hidden tab since you won't see it when you right click the tabs and click unhide.

This method should not be used for utterly sensitive data.


In case of very sensitive data being stored in Excel, do one of two things:

Don't store it in Excel!

Use Method 1 and combine that with password protecting your macros.