+ Reply to Thread
Results 1 to 3 of 3

Match new password to specific user and update list via custom user form

  1. #1
    Registered User
    Join Date
    04-02-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    1

    Match new password to specific user and update list via custom user form

    Hi

    I am stumped and need help.

    I have an Excel workbook that is used at work for Management Information held in a Shared Folder.

    It is set up so that certain parts are password protected and to access is by way of a userform.

    The access details are held on a seperate hidden sheet called Passwords with the User names in column A and the Passwords in Column B. This works great.

    However recently some managers have asked to be able to change their passwords themselves with a Userform.

    The Userform has a hidden Frame above the textbox so when the old password is entered if its correct it brings up the following to allow a change of password shown below.


    The code I have used is fine except that it will only change one password mine in Cell B2, this is below

    Please Login or Register  to view this content.
    The passwords are on sheet 2 between Column B2:B20

    Can anyone help with the code so that ANY users password that is entered correctly in the "Enter Password" text box and is identified between Comumn B2:B20 as correct and take them to the change password textbox in the Frame and also when they change their password it allows it and updates the password in the correct place in Column B wherever it is located between B2:B20.

    You need to click on the Access to Management Command Button and the User name is Portsmouth, the Password is Pompey.

    The workbook with the password pages is attached.

    Many thanks if anyone can.
    Attached Files Attached Files
    Last edited by Sargekd; 04-02-2011 at 05:18 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Match new password to specific user and update list via custom user form

    Have you thought of replacing all your security code with just three lines of code (see demo) ? Here's the thing ... your users have already put in a username and password to get into windows .. right ? Well the system already knows who you are and remembers your login name . So instead of having the user have to type in another name and anther password just have the system validate that the Windows Login name ( i.e. the person currenlty logged in ) has their name on the "Password" sheet in column A. If there name is there then give the access to the manager section.

    So , in you situation , a click on the "access to Management info" button would just run the below function "IsOnManagersList". If the function returns True then let them in .. if the function returns False then no addmitance. Boomba no second passwords or second logging in.

    SETUP
    Setup of a User is simple ... find out users windows login name and put that name in Column A of the Password Sheet. Done.

    Please Login or Register  to view this content.
    Last edited by nimrod; 04-02-2011 at 06:17 PM.

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Match new password to specific user and update list via custom user form

    Cross posted at Ozgrid
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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