Greetings,
Im trying to get a macro button to "toggle" to cycle through th
different grouped views I created but I keep getting a compiling error
VBA is not my forte as maybe you can see and thoughts what Im doin
wrong?
Sub Toggle_View()
'
Sheets("Sheet1").Select
With ActiveSheet
If ActiveSheet.Outline.ShowLevels RowLevels:=1 = True then
ActiveSheet.Outline.ShowLevels RowLevels:=2 False
ActiveSheet.Outline.ShowLevels RowLevels:=3 False
Else
ActiveSheet.Outline.ShowLevels RowLevels:=2 True
ActiveSheet.Outline.ShowLevels RowLevels:=1 False
ActiveSheet.Outline.ShowLevels RowLevels:=3 False
Else
ActiveSheet.Outline.ShowLevels RowLevels:=3 True
ActiveSheet.Outline.ShowLevels RowLevels:=1 False
ActiveSheet.Outline.ShowLevels RowLevels:=2 False
End If
End With
End Sub
Thanking you in advance
--
Fabl
-----------------------------------------------------------------------
Fable's Profile:
http://www.excelforum.com/member.php...nfo&userid=218
View this thread:
http://www.excelforum.com/showthread.php?threadid=27192