Consulting

Results 1 to 8 of 8

Thread: Solved: User Id/Password

  1. #1
    VBAX Regular
    Joined
    Oct 2010
    Location
    Texas
    Posts
    93
    Location

    Solved: User Id/Password

    Hello Everyone,

    I have a spreadsheet with several form control buttons. I also have to groups of Users that input data. I would like some users access to all control buttons while restrict access to some buttons in the other group. Can you give me some advice on how I can accomplish this? I would also like the Users with complete access to have the ability to change User Id's and Passwords for all Users when necessary. I was thinking of a User form with two list boxes but I'm not sure how to proceed. Any thoughts on how I can proceed?

    Any info will be greatly appreciated!

    Thank you.

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    You will have lots to consider. For a password userform, add a textbox control and set the PasswordChar. Make the userform modeless and if the password for a user is correct, unhide the veryhidden sheet of passwords.

  3. #3
    Quote Originally Posted by Kenneth Hobs
    unhide the veryhidden sheet of passwords.
    But we can open this sheet by OpenOffice Program

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    I think it was a simple error by Kenneth, when he referred to "unhide the veryhidden sheet".

    Your logic should be if a User enters the correct password, then the allocated buttons for the level of User, becomes active to this User.
    Last edited by Aussiebear; 01-21-2011 at 04:59 PM. Reason: Corrected User name
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    If you are going to use OpenOffice, then why post to an Excel forum? Maybe you mean that OpenOffice breaks Excel password protection?

    As I said, there are several issues with doing these things. Excel is not all that secure to begin with. However, for the novice to intermediate level user, you can do things to make it more difficult to break protection.

    A common problem using macros is that macros can be bypassed. The way to fix that is to always hide and protect all sheets when you close the workbook. When they open the workbook and the macros are disabled, the sheet(s) will not be seen. I usually leave one sheet open showing that macros were disabled.

    I unhide veryhidden sheets that contains the userids and passwords very easily using code. Passwords are needed for the userform, workbook, worksheet(s), and vbaproject as one would expect. I would not put passwords for userids other than in code for "super" users.

    Speaking of userids, you can use Environ("username") or Application.Username. The first is your Windows username and the second is your name in the Excel Application. Both can be changed by the user easily but I recommend using the first.

    To sum it up, while there are levels of users and levels of protection, do not expect Excel to meet every security need.

  6. #6
    VBAX Regular
    Joined
    Oct 2010
    Location
    Texas
    Posts
    93
    Location
    Thank you for your advice.

  7. #7
    VBAX Contributor CaptRon's Avatar
    Joined
    Mar 2007
    Location
    Austin, Texas
    Posts
    141
    Location
    This is a small example of something I have used to limit user access to selected worksheets. It can also be adapted to limit access to certain cells, rows, or columns on a common sheet.

    No password required for Level 1 access. Level 2 password is zxzx. Admin password is Cricket. No password for the VBE.

    Just something to play around with and maybe it will give you some idea of a direction to go.

    Ron
    Attached Files Attached Files
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes.

  8. #8
    VBAX Regular
    Joined
    Oct 2010
    Location
    Texas
    Posts
    93
    Location
    Thank you very much for your time and input. Capt. Ron Thank you for all the information in that spreadsheet. You've given me some ideas on how to proceed. Thank you again!

Posting Permissions

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