Hello,
I am trying to write a macro to collapse all groupings (rows and columns) on each worksheet within a workbook. The following is what I have, but it does not seem to be doing anything. When I run this macro my screen shows "Calculating: (16 Processor(s)): x%" in the bottom right hand corner. It runs through this several times from 1-100% but does not seem to do anything as far as collapsing the rows and columns goes. Any help would be greatly appreciated.
Sub CollapseGroupings()
'Collapses all rows and columns on each worksheet of a workbook
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
ActiveSheet.Outline.ShowLevels RowLevels:=1
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
Next wsSheet
End Sub
I am trying to write a macro to collapse all groupings (rows and columns) on each worksheet within a workbook. The following is what I have, but it does not seem to be doing anything. When I run this macro my screen shows "Calculating: (16 Processor(s)): x%" in the bottom right hand corner. It runs through this several times from 1-100% but does not seem to do anything as far as collapsing the rows and columns goes. Any help would be greatly appreciated.
Sub CollapseGroupings()
'Collapses all rows and columns on each worksheet of a workbook
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
ActiveSheet.Outline.ShowLevels RowLevels:=1
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
Next wsSheet
End Sub