View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default login userform with change password

On 22 Jun., 00:21, "tkraju via OfficeKB.com" <u16627@uwe wrote:
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.

--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-programming/200806/1


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