When working with complex financial models or inherited client workbooks, you often encounter multiple hidden or ‘very hidden’ worksheets. Unhiding them manually in Excel requires right-clicking and selecting each tab individually, which becomes tedious when dealing with dozens of sheets.
In this guide, you will learn how to use a simple 5-line Excel VBA macro to instantly unhide all hidden and very hidden worksheets in your workbook with a single click.
Why Use VBA to Unhide Worksheets?
Standard Excel UI limitations make bulk worksheet management inefficient. Automating this step provides key benefits:
- Instant Batch Execution: Unhide 5, 20, or 100+ sheets in less than a second.
- Unhide ‘Very Hidden’ Sheets: Reveals sheets set to
xlSheetVeryHiddenthat do not even appear in the standard Excel Unhide dialog box. - Time Savings: Eliminates repetitive right-click clicks during workbook auditing and reviews.
Step 1: Open the Visual Basic Editor
- Open the Excel workbook containing the hidden sheets.
- Press
Alt + F11(Option + F11on Mac) to launch the VBA Editor. - In the top menu, click Insert ➔ Module to open a new code window.
Step 2: Copy and Paste the Unhide VBA Code
Copy the code block below and paste it directly into your module window:
Sub UnhideAllWorksheets()
Dim ws As Worksheet
Dim unhiddenCount As Long
unhiddenCount = 0
' Pause screen updating for faster execution
Application.ScreenUpdating = False
' Loop through every sheet in the workbook
For Each ws In ActiveWorkbook.Worksheets
If ws.Visible <> xlSheetVisible Then
ws.Visible = xlSheetVisible
unhiddenCount = unhiddenCount + 1
End If
Next ws
Application.ScreenUpdating = True
' Completion notification
If unhiddenCount > 0 Then
MsgBox unhiddenCount & " hidden sheet(s) have been successfully unhidden!", vbInformation, "Excel Owl Automation"
Else
MsgBox "No hidden sheets were found in this workbook.", vbInformation, "Excel Owl Automation"
End If
End Sub
Step 3: Run the Macro Using Alt + F8
Trigger the script directly from your Excel window:
- Switch back to your main Excel window.
- Press Alt + F8 (or
Option + F8on Mac) to open the Macro dialog. - Select
UnhideAllWorksheetsand click Run. All hidden tabs will immediately appear!
💡 Pro Tip: Need to Hide All Sheets Again?
To do the reverse and hide all sheets except the active one, simply changews.Visible = xlSheetVisibletows.Visible = xlSheetHiddeninside a conditional check!
Step 4: Save as Macro-Enabled Workbook (.xlsm)
If you plan to reuse this macro inside this workbook in the future, save your file via File ➔ Save As and select Excel Macro-Enabled Workbook (*.xlsm).

Leave a Reply