I’ll use this to reset my reports back to hidden
Sheets “_†is the main sheet and could possibly be hidden.
So I thought of maybe trying something like this
Code: Select all
Dim wssheet As Worksheet
Application.ScreenUpdating = False
ActiveWorkbook.Protect PassWord:="", Structure:=False, Windows:=False
Worksheets("_").Visible = xlSheetVisible
For Each wssheet In ThisWorkbook.Worksheets
If Not wssheet.Name = "_" Then wssheet.Visible = False
Next wssheet
Application.ScreenUpdating = True
ActiveWorkbook.Protect PassWord:="", Structure:=True, Windows:=True
Code: Select all
If Not wssheet.Name = "_" Then wssheet.Visible = False
Code: Select all
If Not wssheet.Name = "_" Then wssheet.Visible = xlSheetHidden