I am using the following code to go through my workbook and collapse all the groups:
Sub HideRowsColumns()
Dim i As Integer
For i = 1 To Sheets.Count
Sheets(i).Outline.ShowLevels RowLevels:=1
Sheets(i).Outline.ShowLevels ColumnLevels:=1
Next i
End Sub
The problem is that if my workbook contains sheets that are graphs, the code doesn't work.
What can I add to the code so that it skips any sheets that are graphs?
Thanks!
Sub HideRowsColumns()
Dim i As Integer
For i = 1 To Sheets.Count
Sheets(i).Outline.ShowLevels RowLevels:=1
Sheets(i).Outline.ShowLevels ColumnLevels:=1
Next i
End Sub
The problem is that if my workbook contains sheets that are graphs, the code doesn't work.
What can I add to the code so that it skips any sheets that are graphs?
Thanks!