login userform with change password

  • Thread starter tkraju via OfficeKB.com
  • Start date
T

tkraju via OfficeKB.com

To open userform1, I created userform2(Login userform) with 2 text boxes
(textbox1-password entry,textbox2-new password),3 command buttons,(Login,
ChangePassword,Quit).No where in w/book the password is stored.when
Loginbutton clicked only textbox1 be visible asking for password validation,
if password is correct,open userform1.If not correct another 2 attempts try,
else close the sub.If ChangePassword button cliks,textbox2 will be visible,
and compares , old password in textbox1 with new pass word in textbox2,
prompting message("password changed," if old pass word is correct, else retry
for 2 attempts and exit sub.
I am unable to change that pword variable,whenever a new password is supplied
to textbox2.
 
P

Per Jessen

To open userform1, I created userform2(Login userform) with 2 text boxes
(textbox1-password entry,textbox2-new password),3 command buttons,(Login,
ChangePassword,Quit).No where in w/book the password is stored.when
Loginbutton clicked only textbox1 be visible asking for password validation,
if password is correct,open userform1.If not correct another 2 attempts try,
else close the sub.If ChangePassword button cliks,textbox2 will be visible,
and compares , old password in textbox1  with new pass word in textbox2,
prompting message("password changed," if old pass word is correct, else retry
for 2 attempts and exit sub.
I am unable to change that pword variable,whenever a new password is supplied
to textbox2.

Hi

Store the password in an unused worksheet, and hide the sheet using:

Sheets("Sheet3").Visible = xlVeryHidden

This hides the sheet so that the only way for you to make it visible
again is by setting this property to True (the user cannot make the
object visible).

Regards,
Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top