hi all,

i have a userform with label, textbox, ok and cancel buttons.
this userform is to prompt users for password.

i use select case for capturing the password entered.
case 1 is correct password
case 2 is blank password which is vbnullstring
case 3 is wrong password where i use case else

when i click on cancel button, it will be detected as case else. cancel=true for my cancel button wont work.

i think the logic is to put an IF statement before SELECT to capture if the cancel button is clicked.

appreciate if anyone could help.

thanks!