How to hide a worksheet in Excel that cannot be unhidden

Excel is a responsive application that has several beneficial tools and features. Did you know you can easily hide a worksheet in Excel? Excel allows users to hide any worksheet in the workbook and thus preventing other users from viewing the Worksheet. In this post, you will learn how to hide a worksheet in Excel completely.

Using the View Code Tool

Here are the steps to follow:

1. Open the Excel application.

2. Open the Excel workbook that contains the Worksheet you want to hide.

3. Right-click on the Worksheet you want to hide. From the menu, click the View Code button.

4. In the VBA screen, locate the VBAProject section. Then, click on the Sheet’s name you want to hide.

5. Click on the Properties Icon in the Ribbon. Alternatively, press the F4 key to open the properties pane.

6. In the Properties pane, locate the Visible section. Click on the Visible drop-down button, and select the 2- xlSheetVeryHidden option.

7. Finally, close the VBA screen, and the Worksheet will be hidden.

Using the Developer Tool

Steps to follow:

1. Open the Excel application.

2. Open the Excel workbook that contains the Worksheet you want to hide.

3. Click on the Developer tab on the Ribbon, and then locate the Visual Basic button. Alternatively, press the Alt + F11 keys on your keyboard to open the Visual Basic feature.

4. In the VBA screen, locate the VBAProject section. Then, click on the Sheet’s name you want to hide.

5. Click on the Properties Icon in the Ribbon. Alternatively, press the F4 key to open the properties pane.

6. In the Properties pane, locate the Visible section. Click on the Visible drop-down button, and select the 2- xlSheetVeryHidden option.

7. Finally, close the VBA screen, and the Worksheet will be hidden.

Using the VBA codes

VBA codes can be used to automate the process of hiding worksheets. Here are the steps to follow to do so:

1. Open the Excel application.

2. Open the Excel workbook that contains the Worksheet you want to hide.

3. Click on the Developer tab on the Ribbon, and then locate the Visual Basic button. Alternatively, press the Alt + F11 keys on your keyboard to open the Visual Basic feature.

4. In the Visual Basic screen, click the Insert tab on the Ribbon and select the Module button.

5. Type the following code in the empty module. However, note that these code lines will hide all the Worksheets apart from the active Sheet.

Sub HideAllExcetActiveSheet()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetVeryHidden

Next ws

End Sub

6. Press the F5 button to run the code. Alternatively, click on the Run tab on the Ribbon.

Alternatively

You can use these code lines to hide worksheets.

Sub HideAllExceptActiveSheet()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetHidden

Next ws

End Sub