This simple macro automatically unhides all rows and columns for you.
VBA Code
Sub UnhideAll()
Columns.EntireColumn.Hidden = False
Rows.EntireRow.Hidden = False
End Sub
How This Macro Works
In this macro, we call on the Columns collection and the Rows collection of the worksheet. Each collection has properties that dictate where their objects are hidden or visible. Running this macro unhides every column in the Columns collection and every row in the Rows collection.
How to Use This Macro
To use this macro, you can copy and paste it into a standard module:
- Activate the Visual Basic Editor by pressing ALT F11.
- Right-click the project/workbook name in the Project window.
- Choose Insert -> Module.
- Type or paste the code in the newly created module.
Sorry, this happens when the worksheet is protected, but the macros work when the sheet is unprotected.
Hi. When I use this macro there is an error message that it s "unable to set the Hidden property of the range class"
To Unhide through all worksheets in a Workbook run the code below: ...
Sub UnhideAll()
Dim ws As Worksheet
Dim starting_ws As Worksheet
Set starting_ws = ActiveSheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
Columns.EntireColumn.Hidden = False
Rows.EntireRow.Hidden = False
Next
starting_ws.Activate
End Sub
@Dylan Sabo Works great thanks