Hide an Excel sheet with 1word2pass

shahrazed -  
pijaku Posted messages 13513 Registration date   Status Modérateur Last intervention   -
Hello,
I would like to know how I can protect my hidden sheet with a password, that is to say, when I click to display it, a dialog box appears to enter the password. Thank you.

<config>Windows 7 / Safari 537.1</config>

4 réponses

Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   5 146
 
Hello,

this code makes sheet2 invisible
Sub Cache()

Worksheets("Feuil2").visible = xlVeryHidden 'xlSheetHidden
End Sub

this code requires a password to display sheet2 which is toto

Sub visible()
Dim Mdp
return:
Mdp = InputBox("Enter the password", "Warning: access to Sheets is secured ")
' If Mdp = "" Then Exit Sub
If Mdp <> "toto" Then Exit Sub
Worksheets("TM00").visible = True
End Sub

https://www.cjoint.com/?BHqnPal8Hlj

See you soon
Mike-31

A period of failure is a perfect moment to sow the seeds of knowledge.
0
pijaku Posted messages 13513 Registration date   Status Modérateur Last intervention   2 771
 
Hi Mike,

Sorry for interrupting, I hadn't refreshed...

Hoping that everything is fine for you.

Have a great day!
0