Grouping worksheets for global format changes
Posted by Stever on June 08, 2001 10:28 AM
I think that I've created yet another mountain out of a mole hill; but, it does work. For instance, I have a series of 15 worksheets in a single workbook and I need to hide and unhide specific rows on each of the sheets. The following VBA works; but, I'm sure that there has to be an easier way. Any thoughts?
****************************
Sub Hide_Detail()
'
' Hide_Detail Macro
' Macro recorded 06/08/2001 by S Mettes
'
Range("A17:A20").Select
Selection.EntireRow.Hidden = True
Range("A23:A26").Select
Selection.EntireRow.Hidden = True
Range("A28:A41").Select
Selection.EntireRow.Hidden = True
Range("A44:A48").Select
Selection.EntireRow.Hidden = True
End Sub
***********************************
Sub Row_Select()
Sheets(Array("Moorhead", "H&OPS", "Kadien")).Select
Sheets("Moorhead").Activate
Hide_Detail
Sheets("H&OPS").Activate
Hide_Detail
Sheets("Kadien").Activate
Hide_Detail
Sheets("Lou's Rollup").Activate
End Sub
*****************************
Sub Unhide_Detail()
'
' Unhide_Detail Macro
' Macro recorded 06/08/2001 by S Mettes
'
Range("A16:A48").Select
Selection.EntireRow.Hidden = False
End Sub
***********************************
Sub Row_Unselect()
Sheets(Array("Moorhead", "H&OPS", "Kadien")).Select
Sheets("Moorhead").Activate
Unhide_Detail
Sheets("H&OPS").Activate
Unhide_Detail
Sheets("Kadien").Activate
Unhide_Detail
Sheets("Lou's Rollup").Activate
End Sub