Hide an Excel sheet with 1word2pass

shahrazed -  
pijaku Posted messages 13513 Registration date   Status Moderator 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 answers

  1. Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 147
     
    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
    1. pijaku Posted messages 13513 Registration date   Status Moderator Last intervention   2 773
       
      Hi Mike,

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

      Hoping that everything is fine for you.

      Have a great day!
      0