coliervile
03-07-2008, 10:22 AM
Good day to everyone. When I open my workbook and depending if the macros are enabled or disabled certain worksheets are suppose to be visible and/or very hidden (xlVeryHidden). The worksheets don't display when the workbook is opened, but the worksheets are accessible through the toolbar Format- Sheet- Unhide. I thought that when worksheets were "xlVeryHidden" they weren't accessible though the toolbar Format- Sheet- Unhide.
Is there something that I'm missing in my coding or am I incorrect about the accessibilty through the toolbar Format- Sheet- Unhide when worksheets are "xlVeryHidden"???
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Warning").Visible = True
Sheets("Printout").Visible = True
Sheets("Printout").Select
Range("A2:E65399").Select
Selection.ClearContents
Range("A2").Select
Sheets("Printout").Visible = False
Sheets("Printout").Visible = x1VeryHidden
Sheets("Dashboard").Visible = x1VeryHidden
Sheets("Leave Request").Visible = x1VeryHidden
ActiveWorkbook.Save
End Sub
Private Sub Workbook_Open()
Sheets("Dashboard").Visible = True
Sheets("Warning").Visible = x1VeryHidden
Sheets("Printout").Visible = x1VeryHidden
Sheets("Leave Request").Visible = x1VeryHidden
End Sub
Is there something that I'm missing in my coding or am I incorrect about the accessibilty through the toolbar Format- Sheet- Unhide when worksheets are "xlVeryHidden"???
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Warning").Visible = True
Sheets("Printout").Visible = True
Sheets("Printout").Select
Range("A2:E65399").Select
Selection.ClearContents
Range("A2").Select
Sheets("Printout").Visible = False
Sheets("Printout").Visible = x1VeryHidden
Sheets("Dashboard").Visible = x1VeryHidden
Sheets("Leave Request").Visible = x1VeryHidden
ActiveWorkbook.Save
End Sub
Private Sub Workbook_Open()
Sheets("Dashboard").Visible = True
Sheets("Warning").Visible = x1VeryHidden
Sheets("Printout").Visible = x1VeryHidden
Sheets("Leave Request").Visible = x1VeryHidden
End Sub