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.
Bookmarks