B
BNT1 via OfficeKB.com
Hi
Just a query. Got the following force macro off this forum. when the macro
is not enabled, the "warning" sheet is visible, plusall the graph sheets i
have in the workbook. The data sheets are hidden
FYI - there are other macro for enabling grouping.(not sure if relevant)
can the graphs also be hidden?
regards
Brian
Private Sub Workbook_Open()
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets(i).Visible = True
Next i
Sheets("Warning").Visible = xlVeryHidden
Application.ScreenUpdating = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets("Warning").Visible = True
If Sheets(i).Visible = True And Sheets(i).Name <> "Warning" Then
Sheets(i).Visible = xlVeryHidden
End If
Next i
Application.DisplayAlerts = False
ActiveWorkbook.Save
End Sub
Just a query. Got the following force macro off this forum. when the macro
is not enabled, the "warning" sheet is visible, plusall the graph sheets i
have in the workbook. The data sheets are hidden
FYI - there are other macro for enabling grouping.(not sure if relevant)
can the graphs also be hidden?
regards
Brian
Private Sub Workbook_Open()
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets(i).Visible = True
Next i
Sheets("Warning").Visible = xlVeryHidden
Application.ScreenUpdating = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets("Warning").Visible = True
If Sheets(i).Visible = True And Sheets(i).Name <> "Warning" Then
Sheets(i).Visible = xlVeryHidden
End If
Next i
Application.DisplayAlerts = False
ActiveWorkbook.Save
End Sub