ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   message box appears and appears (https://www.excelbanter.com/excel-discussion-misc-queries/216459-message-box-appears-appears.html)

Wanna Learn

message box appears and appears
 
Hello
I created a form for the sales force to use.
When cell D13 is selected a message box appears with some information
I added a command button and added the Sub
Mail_Selection_Range_Outlook_Body() from Ron De Bruins site.
when ever I submit the form the message box appears. If a select ok then
the email is created then everything is fine.
I do not want the message box to appear again when I am sending the email.
How do I fix that?
thanks in advance


Luke M

message box appears and appears
 
At the beginning of your mail sub, add this line:
Application.EnableEvents = False

and at the end of the sub:
Application.EnableEvents = True

I'm assuming you have the message box displayed based on an event macro, so
this will prevent the event from being triggered.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Wanna Learn" wrote:

Hello
I created a form for the sales force to use.
When cell D13 is selected a message box appears with some information
I added a command button and added the Sub
Mail_Selection_Range_Outlook_Body() from Ron De Bruins site.
when ever I submit the form the message box appears. If a select ok then
the email is created then everything is fine.
I do not want the message box to appear again when I am sending the email.
How do I fix that?
thanks in advance



All times are GMT +1. The time now is 04:54 PM.

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