Good Morning All
I have a loop that hides all sheets on closing but will not hide the charts. How do I do this?? Code as follows:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim a&
With Workbooks("Credit Card Recap 1.5")
'Loop through the worksheets
For a& = .Worksheets.Count To 2 Step -1
'Hide all but the first worksheet
.Worksheets(a&).Visible = xlSheetVeryHidden
Next a&
End With
'Application.ActiveWorkbook.Save
End Sub
Have a great day.
George
I have a loop that hides all sheets on closing but will not hide the charts. How do I do this?? Code as follows:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim a&
With Workbooks("Credit Card Recap 1.5")
'Loop through the worksheets
For a& = .Worksheets.Count To 2 Step -1
'Hide all but the first worksheet
.Worksheets(a&).Visible = xlSheetVeryHidden
Next a&
End With
'Application.ActiveWorkbook.Save
End Sub
Have a great day.
George