VBA – Unhide All Worksheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on December 5, 2022

Unhide All Worksheets in Workbook

The following is a macro to unhide all worksheets in a workbook.

Sub UnhideAll()
Dim WS As Worksheet

    For Each WS In Worksheets
        WS.Visible = True

End Sub

Check Workbook for Hidden Worksheets

If you suspect there are hidden worksheets in a workbook, follow these steps to check for hidden sheets:

1. Open the VB Editor (ALT + F11)

2. In the Project Explorer, expand the Project for your workbook

3. Expand the Excel objects for your workbook

Do you see more sheets listed in the Project Explorer than appear in your workbook?

unhide all worksheets

If the answer is Yes, it’s most likely because one or more sheets are hidden.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text


Learn More!

<<Return to VBA Examples


VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples