I was thinking, maybe I should convert the inputbox to a form.Because you are using the built in InputBox (indirectly via the modified InputBoxDK that allows the masking) you cannot easily disable the OK button. To do that you would need to replace it with your own modal form.
To exit the code if the user does not enter a password simply add this line after the call to the inputbox:
Code:WPassStr = InputBoxDK(Message, Title) '(* Password) If WPassStr ="" Then Msgbox "You did not enter a password, the emailing process will end",vbCritical :Exit Sub
To check if the password is correct you would need to either store it in the database (which would obviously pose certain risks) or wait until you get the Gmail authentication error. What happens now if the wrong password is entered?
Cheers,
When an incorrect password, no password or cancel, the macro runs, no mail is sent and the form closes and operation continues
I need to have the password entered, authenticated, then to continue to the macro.