Results 1 to 3 of 3

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

Threaded View

  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

    Option Explicit
    Private Sub CommandButton1_Click()
    'frame1 is hidden until password is validated
    If TextBox1.Value = Sheet2.Range("B2").Value Then
      Frame1.Visible = True
      Me.Height = 90
    Else: Unload Me
    End If
    End Sub
    Private Sub CommandButton2_Click()
    Sheet2.Range("B2").Value = TextBox2.Value
    End Sub
    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.

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