Outlook to Gsuite

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,
 
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,
I was thinking, maybe I should convert the inputbox to a form.

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.
 
Are you going to authenticate the password yourself by comparing it with a stored value in your db (which could expose security risks) or letting Google reject the login attempt and catching that. I asked in my previous post what happens if you enter a wrong password, can you please let us know?
 
I would rather let Google authenticate and reject
 
And it does not? Can you show what is happening if you enter the wrong password? What message\error do you get?

Cheers,
Vlad
 
And it does not? Can you show what is happening if you enter the wrong password? What message\error do you get?

Cheers,
Vlad
It does indeed, I get error message

1618461461209.png


and when you had an error, the hour meter remains running
also, when you had an error and the hour meter runs, it is difficult to navigate to design mode

I just need to be able to go back to re enter the password.
 
Have a look at the Gmail code on my website here.


I draw your attention to the error checking code block, in particular it checks that error code your error has generated, returning a more helpful error message. "Wrong Password"...

You might benefit from incorporating at error block into your project....
 
Last edited:
Have a look at the Gmail code on my website here.

I draw your attention to the error checking code block, in particular it checks that error code your error has generated, returning a more helpful error message. "Wrong Password"...

You might benefit from incorporating at error block into your project....
Thank you

Will most definitely have a look.

Please supply URL to you Website
 
Please supply URL to you Website

Opp's!

Here:-

 

Users who are viewing this thread

Back
Top Bottom