+ Reply to Thread
Results 1 to 5 of 5

Individual Passwords per sheet

  1. #1
    Registered User
    Join Date
    06-19-2011
    Location
    blackpool, england
    MS-Off Ver
    Excel 2007
    Posts
    19

    Individual Passwords per sheet

    I have created a workbook, it has 5 sheets, various formula's link to cells on the other sheets in the same workbook. Everything works fine, except passwording it.

    Currently someone opens the worksheet, if there is a password, they go through unlocking it, however if they save it and close, next time they open it, there's no password.

    What I'm trying to do is a seperate password on each sheet coded in through vb so that everytime someone wants to edit a particular sheet, they'll need to put the password in. I don't mind if the password has to be included in the vb code.
    Last edited by Djarn; 02-19-2012 at 09:53 AM. Reason: solved

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Individual Passwords per sheet

    hi,
    see if it helps you...
    continue for rest of yr sheets
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Individual Passwords per sheet

    That's the right idea John, but it would be bothersome to have to keep entering passwords as the user moved back and forth from sheet to sheet while working, they already entered the password once, so that should "stick" for their session.

    I would recommend trying out putting all the passwords into the Workbook_Open macro to reset them all when the book is first opened, any sheets that are legitimately unlocked will stay unlocked for that session.

    In ThisWorkbook
    Please Login or Register  to view this content.

    This is less cumbersome, but this is still far from secure. If a person opens your workbook with macros disabled, this wouldn't trigger. It's a whole 'nother topic, so Google "Excel VBA force macros" for some great suggestions on making your workbook unusable if macros are disabled.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Individual Passwords per sheet

    hi JBeaucaire,
    you're right! I use it for some sheets!
    ...but I did not understand what he meant by "(...)so that everytime someone wants to edit a particular sheet, they'll need to put the password in"

  5. #5
    Registered User
    Join Date
    06-19-2011
    Location
    blackpool, england
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Individual Passwords per sheet

    Many thanks to both john55 and JBeaucaire

    Both answers are actually helpful, obviously I'll only use one but both helped me understand a bit more.

    I shall now close this somehow :P

+ 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