ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   password userform (https://www.excelbanter.com/excel-programming/318723-password-userform.html)

ROland

password userform
 
For a small VBA application, I need a password (PW) check.
I constructed a userform with 1 combobox for userlist, 3 textboxes (1 for
old PW, 1 for new PW and 1 for validation) and 2 commandbuttons (cancel and
OK).
After the user select his name, he is allowed to enter his (old) PW in
textbox1, followed by <enter.
Imediatelly, his PW is checked (with exit event); if not correct he get a
message and try again, if correct, the 2 other textboxes are enabled for text
input.

Problem;
1/ Entering the first textbox1 and checking password is OK, but after 1
failure of the PW check, I'm not allowed to push the cancel command (?).
2/ After entering the correct password, the cursor does not jump to
textbox2, and that's what I want.
3/ The same procedures should go for textbox2 and 3 for checking minimal 3
characters of new and validated password. I did not do this yet because I can
use approx the same code as for textbox1 (also exit event)

What's wrong?

Thanks in advance


Dick Kusleika[_4_]

password userform
 
Roland

You'll have to post the code.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Roland wrote:
For a small VBA application, I need a password (PW) check.
I constructed a userform with 1 combobox for userlist, 3 textboxes (1
for old PW, 1 for new PW and 1 for validation) and 2 commandbuttons
(cancel and OK).
After the user select his name, he is allowed to enter his (old) PW in
textbox1, followed by <enter.
Imediatelly, his PW is checked (with exit event); if not correct he
get a message and try again, if correct, the 2 other textboxes are
enabled for text input.

Problem;
1/ Entering the first textbox1 and checking password is OK, but after
1 failure of the PW check, I'm not allowed to push the cancel command
(?). 2/ After entering the correct password, the cursor does not jump
to textbox2, and that's what I want.
3/ The same procedures should go for textbox2 and 3 for checking
minimal 3 characters of new and validated password. I did not do this
yet because I can use approx the same code as for textbox1 (also exit
event)

What's wrong?

Thanks in advance





All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com