+ Reply to Thread
Results 1 to 9 of 9

Multiple User Passwords for a Workbook???

  1. #1
    Registered User
    Join Date
    12-19-2008
    Location
    usa
    MS-Off Ver
    2007 PRO
    Posts
    1

    Multiple User Passwords for a Workbook???

    Is it possible to have multiple user ID's and passwords for a single workbook. I am trying to control who accesses and has editing rights to a workbook. The reason I would like to do something like user ID's and passwords is I have people that give out the password and if each user was unique it would prevent this problem! Thanks for any help or ideas!

  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
    Hi,

    There's no built in functionality to do this but you could program something similar. Set up a table of user names and passwords on a sheet which will be made 'veryhidden' in the VBE.

    Then have a user input box which would ask for the users name and password. It would then check this password against the table of user names and passwords, and if correct allow the user to continue. If you password protect the VBE then a user wouldn't even be able to go to the VBE and unhide the password sheet.

    HTH

  3. #3
    Registered User
    Join Date
    12-20-2008
    Location
    Norfolk UK
    Posts
    2
    Morning
    This is just what I was looking for
    sorry to sound really thick but what is vbe
    not been using excel long
    thanks for any help

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Dave,

    VBE is the visual basic editor.

    Posting questions in other people's threads is verboten in this forum and most others I know of. Please get started on the right foot: take a few minutes to read the Forum Rules, and then start your own thread. Include a link to this one if you feel it's particularly relevant.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Quote Originally Posted by draco
    Is it possible to have multiple user ID's and passwords for a single workbook. I am trying to control who accesses and has editing rights to a workbook.
    Yes, it's possible, definitely will require macros/VBA to accomplish.

    Attached is a workbook I helped someone here on the forum create to do something similar to what you want. It asks for a password when opened.

    Password = staff - you only can see Sheet1
    Password = admin - all three sheets are visible and editable.

    Something like this may be adaptable for your needs.

    It uses macros during the workbook_open, workbook_save and workbook_close events. Even the macros themselves in the VBE are password protected (also admin if you decide to look at them.).
    Quote Originally Posted by draco
    The reason I would like to do something like user ID's and passwords is I have people that give out the password and if each user was unique it would prevent this problem!
    Good luck with that. I've found little stops people from giving out passwords, it's unbelievable. Your new sheet might stem the tide for a while, but eventually, the password grapevine starts again.

    I hope you have better luck than I ever have. I eventually gave it up and started using tricks like the attached sheet to keep the REALLY important parts of the workbooks hidden away. Now my stress is less.

    Good luck.
    Attached Files Attached Files
    Last edited by JBeaucaire; 12-21-2008 at 12:52 AM.
    _________________
    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!)

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    You might match passwords with usernames. It would make it less easy to use someone else's password.

  7. #7
    Registered User
    Join Date
    04-01-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Multiple User Passwords for a Workbook???

    hi, i can't seem to be able to unlock your VBA to view the macros, please advise on this. I've tried your password "admin" many times but to no avail.

    thanks!

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

    Re: Multiple User Passwords for a Workbook???

    There is no other password. CTRL-F11 to open the VBA editor, then click on the project and put in the "admin" password again.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Multiple User Passwords for a Workbook???

    This example contains a UserForm that asks for a password. The password can be different for individual users & access to specific sheets allocated. The form also allows for a password to be changed after logging in correctly
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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