Mandy_
asked on
Excel Hide / Unhide some worksheets with password
Dear experts,
i like for example 6 sheets viewable and 3 sheets hide / unhide with password.
I've found the code below and execute the macros with e.g. ctrl.u for unhide and CTRL-H for hide.
1. I want to change that i can unhide / hide sheet7,sheet8,sheet9 in one step with CTRL-U, CTRL-H
2.Now every User can see the Macro Code with the password include - How can i protect that?
Thanks in advance
i like for example 6 sheets viewable and 3 sheets hide / unhide with password.
I've found the code below and execute the macros with e.g. ctrl.u for unhide and CTRL-H for hide.
1. I want to change that i can unhide / hide sheet7,sheet8,sheet9 in one step with CTRL-U, CTRL-H
2.Now every User can see the Macro Code with the password include - How can i protect that?
Thanks in advance
;hide sheet
Sub HideSheet2()
Sheets("Sheet2").Visible = xlVeryHidden
End Sub
;unhide sheet
Sub ViewSheet2()
pword = Application.InputBox("Enter password to view sheet2", "PASSWORD REQUIRED")
If pword = "PASSWORD" Then
Sheets("Sheet2").Visible = True
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you broke my personal record for fastest acceptance of an answer! I'm glad you think this will help.
-Glenn
-Glenn
ASKER