awesomebox8
New Member
- Joined
- Nov 11, 2016
- Messages
- 3
I have an excel model that is used for real estate acquisitions. 8 of the 13 sheets contain a simple macro (activated by two separate buttons) to hide or reveal blank cells. I would like to create a macro on the Summary sheet to activate the "Hide" button on each of the 8 sheets.
Is there a simple way to do this? I have one that works to reveal all of the hidden rows and columns see below, but cannot figure out how to activate the hide macros. Thank you for your help!
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
Is there a simple way to do this? I have one that works to reveal all of the hidden rows and columns see below, but cannot figure out how to activate the hide macros. Thank you for your help!
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