S
SIGE
Hi There,
I've 3 sheets:
sheet1: to view when pwd OK
sheet5: INFOsheet, to show when macros disabled
sheet6: Sheet with PARAMETERS
*Sheet 6 has to be remain hidden at all times...!
But I run into an error on the Sub HideAll()at line:
'@@@@****
wsSheet.Visible = xlSheetVeryHidden
'@@@@@*****
*I still see Sheet5 when running ShowAll ()!
Can anyone see what is wrong????
On Open workbook I run sub ShowAll()
On Close WBK i run Sub HideAll()
Sub HideAll()
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName = "Sheet5" Then
wsSheet.Visible = xlSheetVisible
Else
'@@@@****
wsSheet.Visible = xlSheetVeryHidden
'@@@@@*****
End If
Next wsSheet
Application.ScreenUpdating = True
End Sub
Sub ShowAll()
bIsClosing = False
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName <> "Sheet5" Or wsSheet.CodeName <> "Sheet6" Then
wsSheet.Visible = xlSheetVisible
End If
Next wsSheet
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheet5.Visible = xlSheetVeryHidden
Sheet6.Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub
I've 3 sheets:
sheet1: to view when pwd OK
sheet5: INFOsheet, to show when macros disabled
sheet6: Sheet with PARAMETERS
*Sheet 6 has to be remain hidden at all times...!
But I run into an error on the Sub HideAll()at line:
'@@@@****
wsSheet.Visible = xlSheetVeryHidden
'@@@@@*****
*I still see Sheet5 when running ShowAll ()!
Can anyone see what is wrong????
On Open workbook I run sub ShowAll()
On Close WBK i run Sub HideAll()
Sub HideAll()
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName = "Sheet5" Then
wsSheet.Visible = xlSheetVisible
Else
'@@@@****
wsSheet.Visible = xlSheetVeryHidden
'@@@@@*****
End If
Next wsSheet
Application.ScreenUpdating = True
End Sub
Sub ShowAll()
bIsClosing = False
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName <> "Sheet5" Or wsSheet.CodeName <> "Sheet6" Then
wsSheet.Visible = xlSheetVisible
End If
Next wsSheet
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheet5.Visible = xlSheetVeryHidden
Sheet6.Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub