how to send key "press" a key in a dialog?

T

Temoc

While running a macro I have to send the active workbook by email, so the
send mail dialog box opens and awaits for a press button like response.

I want to press the button that says "yes"

How can I "press" the "yes" button by means of a macro instruction?
 
J

Jacob Skaria

Greetings!

You may use the Sendkeys statement
SendKeys "Y", True

There is another option available in VBA to disable such alerts
Application.DisplayAlerts = False

Please try...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top