Sub ExpandAllColumns()
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=8
End Sub
Sub CollapseAllColumns()
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
End Sub
Sub CollapseAllRows()
ActiveSheet.Outline.ShowLevels RowLevels:=1
End Sub
Sub ExpandAllRows()
ActiveSheet.Outline.ShowLevels RowLevels:=8
End Sub
Sub ToggleGroupExpand()
If Range("A:A").EntireColumn.Hidden = True Then
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=8
Else
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
End If
End Sub
Sub ToggleGroupExpand()
If Range("A:A").EntireColumn.Hidden = True Or _
Range("H:J").EntireColumn.Hidden = True Or _
Range("M:N").EntireColumn.Hidden = True Then
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=8
Else
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
End If
End Sub
Sub CollapseAll()
Sheet2.Outline.ShowLevels RowLevels:=1, ColumnLevels:=1
End Sub
Sub ExpandAll()
Sheet2.Outline.ShowLevels RowLevels:=8, ColumnLevels:=8
End Sub
Sub ShowHideColumnsRows()
If ActiveSheet.Shapes("Button 3").TextFrame.Characters.Text = "Hide Groupings" Then
ActiveSheet.Shapes("Button 3").TextFrame.Characters.Text = "Show Groupings"
Call CollapseAll
Else
ActiveSheet.Shapes("Button 3").TextFrame.Characters.Text = "Hide Groupings"
Call ExpandAll
ActiveSheet.Range("A1").Select
End If
End Sub