Want to cycle through PivotCharts and Charts continuasly
The solution is
Sub ToogleSheetVisiblity()
Dim wsSheet As Worksheet
On Error Resume Next 'If code tries to hide all Sheets
For Each wsSheet In Worksheets
wsSheet.Visible = Not wsSheet.Visible
Next wsSheet
On Error GoTo 0 'One sheet will always be left visible
End Sub
"Michael" wrote in message
...
I have a worksheet with 2 PivotCharts (in separate worksheets) and two
other charts (again in 2 separate worksheets). I want to write some sample
VBA code that runs all the time and simply cycles through these 4
worksheets. Anyone with some sample code?
Thanks
Michael
|