+ Reply to Thread
Results 1 to 8 of 8

password hidden sheet

  1. #1
    Registered User
    Join Date
    11-24-2009
    Location
    Antwerp
    MS-Off Ver
    Excel 2003
    Posts
    7

    password hidden sheet

    Hi,

    I would like to set a password on a single hidden sheet to protect to be opened by everybody.
    i know there's a rather simple VBA script for it but I don't know it anymore.
    Can anyone help please ?
    thanks a lot.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: password hidden sheet

    Hi

    Please Login or Register  to view this content.
    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    11-24-2009
    Location
    Antwerp
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: password hidden sheet

    sorry, doesn't work.
    Where do I have to copy this code in ?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: password hidden sheet

    Hi,

    I think you'll find it does

    It all depends on when you want to invoke it.

    You could create a module level procedure, say Sub ProtectMySheet....End Sub() and create a button on the s/s and attach the procedure to the button.

    Alternatively you could put it in some event like a Workbook_Open event.

    Rgds

  5. #5
    Registered User
    Join Date
    11-24-2009
    Location
    Antwerp
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: password hidden sheet

    I'm sure you're right but I'm not that technical so I have absolutely no clue what you're talking about.
    I just know that it was a 3 or 4 line code but can't remember it.
    So unless you can give the complete code or an example file I'll have to search further on the web.
    But thanks anyway for your help

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: password hidden sheet

    Hi,

    Unless you give us some clues it's sometimes difficult to know just how familiar users are with various aspects of Excel. Your original post suggested that you had at least heard of VBA and therefore I assumed you knew the very basics.

    It's not entirely clear what you mean by
    I would like to set a password on a single hidden sheet to protect to be opened by everybody
    However on the attached I've added four buttons. Two will Hide or Unhide Sheet 2 and the other two will either Protect or Unprotect Sheet 1. The password is 'test'

    HTH
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-24-2009
    Location
    Antwerp
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: password hidden sheet

    hi,

    I understand you "concern". I'll keep it in mind for my next post to be more specific. And thans again for the efoort you did on helping.

    Actually what I want isn't that difficult.
    I just want that, when a sheet is hidden and somebody wants to unhide this sheet a password is asked. If the password is wrong the sheet obviously may not be opened and offcourse if the password is correct it has to open.
    And all this without having to work with buttons or anything else.
    I hope this is clear enough.

    Thanks !

    Rgds

  8. #8
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: password hidden sheet

    Good afternoon

    I have a template available that does just what you are requiring. It can handle an unlimited amount of users (well, just over 65,500 actually) who enter a usernameand password on opening the file and gives the administrator total control. You just integrate my workbook into yours and away you go - it was designed to be integrated into others peoples' projects and comes with full instructions and the code is unprotected so you can see how it works.

    This is slightly different from what you are asking, as the sheet won't require a password to unhide, but the user will not see any sheets that he / she is not authoruised to see on opening the workbook.

    If you want a copy of this workbook, PM me your e-mail address.

    HTH

    Dominic
    Please familiarise yourself with the rules before posting. You can find them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1