If you hide allt he sheets you want to and then protect the workbook with a password, the following will unprotect and unhide all sheets (including charts) you have hidden: -
Public Sub UnprotectandUnhide()
Dim sh As Object
Dim Pass As String
Pass = InputBox("Please enter password to unhide sheets")
On Error GoTo ErrorHandler
ActiveWorkbook.Unprotect Pass
For Each sh In Sheets
If sh.Visible = False Then sh.Visible = True
Next sh
Exit Sub
ErrorHandler:
MsgBox "Wrong password, please re-enter"
On Error GoTo 0
End Sub
Like this thread? Share it with others