ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tab through & hit enter through a message box with a macro (https://www.excelbanter.com/excel-programming/395081-tab-through-hit-enter-through-message-box-macro.html)

Sam

Tab through & hit enter through a message box with a macro
 
Hi Guys,

I have a macro that executes fine except for four message boxes that
pop up. One is a "Microsoft Visual Basic" box that says "file not
found". I basically know what the issue is, but for now I want to just
to be able to hit "enter" and move on. The next box reads "Microsoft
Office Outlook" stating "Do I want to email the file?" I want to tab
over twice and select the option of "yes". The last message box is
asking, do I want to save the file I just worked with. The answer is
"no" so I want to be able to tab over twice and depress "enter".
Finally the last box comes up with the same message for another file
the macro opened. I want to answer "no" for that option as well.

Thanks guys for your help.

Sam


Jim Thomlinson

Tab through & hit enter through a message box with a macro
 
You are better off to avoid having the message boxes pop up than to try to
respond to them when you do. By restructuring your code you should be able to
get around the message boxes. Post what you have and we can help you to
adjust your code appropriately.

Here is a link to Ron's site on e-mailing which by the sounds of it might
actually cover off everything you want to do...

http://www.rondebruin.nl/sendmail.htm
--
HTH...

Jim Thomlinson


"Sam" wrote:

Hi Guys,

I have a macro that executes fine except for four message boxes that
pop up. One is a "Microsoft Visual Basic" box that says "file not
found". I basically know what the issue is, but for now I want to just
to be able to hit "enter" and move on. The next box reads "Microsoft
Office Outlook" stating "Do I want to email the file?" I want to tab
over twice and select the option of "yes". The last message box is
asking, do I want to save the file I just worked with. The answer is
"no" so I want to be able to tab over twice and depress "enter".
Finally the last box comes up with the same message for another file
the macro opened. I want to answer "no" for that option as well.

Thanks guys for your help.

Sam




All times are GMT +1. The time now is 06:54 AM.

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