How to Hide a Worksheet in Excel (that can not be unhidden) (2024)

Hiding and Unhiding worksheets in Excel is a straightforward task.

You can hide a worksheet and the user would not see it when he/she opens the workbook. However, they can easily unhide the worksheet if they want (as we will see later in this tutorial).

But what if you don’t want them to be able to unhide the worksheet(s).

To do that, you need to take a couple of additional steps to make sure the worksheets are ‘very hidden’ (also covered later in this tutorial).

Let’s see how to hide a worksheet in Excel so that it can easily be unhidden, or can not be unhidden.

This Tutorial Covers:

Regular Way of Hiding a Worksheet in Excel

You can use the below steps to hide a worksheet in Excel:

  • Right-click on the sheet tab that you want to hide.
  • Click on Hide.How to Hide a Worksheet in Excel (that can not be unhidden) (1)

This would instantly hide the worksheet, and you will not see it in the workbook. This setting remains intact when you save the workbook and reopen it again, or send it to some else.

PRO TIP: To hide multiple sheets at one go, hold the Control key and then select the sheet tabs (that you want to hide) one by one. Once selected, right-click on any one of the selected tabs and click on ‘Hide”. This will hide all the worksheets at one go.

While this method hides the worksheet, it’s extremely easy to unhide these worksheets as well.

Here are the steps to unhide a worksheet in Excel:

  • Right-click on any of the existing tabs.
  • Click on Unhide.How to Hide a Worksheet in Excel (that can not be unhidden) (2)
  • In the Unhide dialog box, select the sheet you want to unhide.How to Hide a Worksheet in Excel (that can not be unhidden) (3)
  • Click OK.

This will instantly make the sheet visible in the workbook.

Note that you can only unhide one sheet at a time. To unhide multiple sheets, you need to repeat the above steps to unhide each worksheet. Alternately, you can use a macro code to unhide all the worksheets at one go.

While this method works in most cases, it doesn’t really help if you want to hide the worksheets so that your client or colleague (or anyone with whom you share the workbook) can’t unhide and view these.

All they need to do is right-click on any of the tabs and they will see what all worksheets are hidden (and unhide these easily).

So let’s see how you can really hide a worksheet so that it can not be unhidden (at least not so easily).

Hide a Worksheet So That It Can Not be Unhidden

Here are the steps to hide a worksheet so that it can not be unhidden:

  • Right-click on any of the worksheet tabs.
  • Click on View Code.How to Hide a Worksheet in Excel (that can not be unhidden) (4)
  • In the VB Editor, in the project explorer in VB Editor, select the worksheet you want to hide.How to Hide a Worksheet in Excel (that can not be unhidden) (5)
  • With the sheet selected, click on the Properties icon in the toolbar (or use the keyboard shortcut F4).How to Hide a Worksheet in Excel (that can not be unhidden) (6)
  • In the Properties pane that opens, select the drop-down in front of the option “Visible”.How to Hide a Worksheet in Excel (that can not be unhidden) (7)
  • Select ‘2 – xlSheetVeryHidden’.How to Hide a Worksheet in Excel (that can not be unhidden) (8)
  • Close the VB Editor.

Now you will notice that the sheet is hidden.

When you right-click on any of the tabs, you will not see it in the list of hidden sheets that you can unhide.

Is this method foolproof? –NO!

This method works as a user can not see the hidden sheet in the list of sheets that he/she can unhide.

But this doesn’t mean that the sheet can’t be unhidden.

Unhide a Sheet that has been ‘Very Hidden’

Here are the steps to unhide a sheet that has been ‘Very Hidden’:

  • Right-click on any of the existing tabs.
  • Click on View Code.How to Hide a Worksheet in Excel (that can not be unhidden) (9)
  • In the VB Editor, click on the sheet name you want to unhide (it will be available in the project explorer as a part of the Workbook objects).How to Hide a Worksheet in Excel (that can not be unhidden) (10)
  • If the properties pane is not visible, click on the Properties icon in the toolbar (or use the keyboard shortcut F4).How to Hide a Worksheet in Excel (that can not be unhidden) (11)
  • In the Properties pane, change the Visible property from‘2 – xlSheetVeryHidden’ to ‘-1 – xlSheetVisible’.How to Hide a Worksheet in Excel (that can not be unhidden) (12)
  • Close the VB Editor.

This will unhide the worksheet and it will be visible in the workbook.

Hide/Unhide Worksheets Using VBA

If you have a lot of worksheets that you need to hide/unhide, it can take up a lot of your time.

Using a simple VBA code can automate this task for you.

Hide All Worksheets Using VBA

Below is the VBA code that will hide all the worksheets except the current/active worksheet:

'This macro will hide all the worksheet except the active sheetSub HideAllExceptActiveSheet()Dim ws As WorksheetFor Each ws In ThisWorkbook.WorksheetsIf ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetHiddenNext wsEnd Sub

The above code would hide all the worksheet except the except the active sheet. However, it will hide it so that these can be unhidden easily (note that ws.Visible property is set to xlSheetHidden).

If you want to hide the sheets so that these can not be unhidden, use the below code:

'This macro will hide all the worksheet except the active sheetSub HideAllExcetActiveSheet()Dim ws As WorksheetFor Each ws In ThisWorkbook.WorksheetsIf ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetVeryHiddenNext wsEnd Sub

The only change we have done here is making the ws.Visible property xlSheetVeryHidden.

Unhide All Worksheets Using VBA

Below is the code that will unhide all the hidden worksheets in the workbook.

'This code will unhide all sheets in the workbookSub UnhideAllWoksheets()Dim ws As WorksheetFor Each ws In ThisWorkbook.Worksheetsws.Visible = xlSheetVisibleNext wsEnd Sub

Using this code, we simply go through each worksheet one by one and make the ws.Visible property equal to xlSheetVisible.

Where to put the code?

Below are the steps to place the code in the VB Editor:

  • Click on the Developer tab.How to Hide a Worksheet in Excel (that can not be unhidden) (13)
  • Click on the Visual Basic icon (or use the keyboard shortcut – ALT + F11).How to Hide a Worksheet in Excel (that can not be unhidden) (14)
  • In the VB Editor, right-click on any of the objects of the workbook.
  • Go to Insert and select Module. This will insert a new module in the workbook.How to Hide a Worksheet in Excel (that can not be unhidden) (15)
  • Double click on the Module icon and copy and paste the code in the module code window.How to Hide a Worksheet in Excel (that can not be unhidden) (16)

Now you can assign the macro to a shape or run it from the Developer tab. You can read more about different ways to run a macro in Excel here.

Note that you don’t need to insert a new module for each code. You can have one single module and have multiple VBA macro codes in it.

You May Also Like the Following Excel Tutorials:

  • Unhide Columns in Excel (A Simple Step-by-step Guide)
  • How to Unhide Sheets in Excel (All In One Go)
  • How to Create and Use an Excel Add-in.
  • Useful Excel Macros for Beginners.
  • How to Lock Cells in Excel.
  • How to Lock Formulas in Excel.
  • Hide Zero Values in Excel
  • How to Delete All Hidden Rows and Columns in Excel
  • How to Hide or Show Formula Bar in Excel?
How to Hide a Worksheet in Excel (that can not be unhidden) (2024)

References

Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 5654

Rating: 4.2 / 5 (63 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.