edit a macro using a macro.

  • Thread starter Thread starter chrisdarl
  • Start date Start date
C

chrisdarl

Hi, have a userform that logs in a user, i am wanting to create a secon
userform to alow the user to change there password.
I have used this code to check if the password and username ar
correct.
==============================================
Private Sub ok_Click()
If admin_username = "administrator" And admin_pass
"password" Then
Unload Me
adminform.Show
Else
If MsgBox("You have entered incorrect details. would yo
like to try again?", vbYesNo, "Error") = vbOK Then
admin_login.Show
Else
Unload Me
End If
End If
End Sub
==============================================
Is it possible to have a userform that allows the user to input the ol
password, and a new one. Once the Ok button is clicked a macro serache
a set macro for the password entered, if correct changes it els
displays a msgbox.

Any help would be great thanks in advance.

Chri
 
Hi Chris

My 0.02; don't use macros to store information that can or will change during your
lifetime. Save it, encrypted if needed, in a hidden sheet, in a textfile, a database or
anywhere else.
 
Back
Top