ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Processing a Message Box w/in a Macro (https://www.excelbanter.com/excel-programming/411313-processing-message-box-w-macro.html)

Randy[_17_]

Processing a Message Box w/in a Macro
 
I could use help with the following;

I have a macro and when I run it, it displays a message box offering
three choices, "OK, Cancel and Help". When I choose "OK", the macro
continues to run to a successful conclusion. I want to process this
message box within the micro with the choice "OK". To accomplish
this I use the following code:

Application.DisplayAlerts = OK

When I run the macro initially, the message box still appears even
with this code. I click "OK" and the macro continues sucessfully. If
I run it a second time or subsequent times with the same or different
data, I do not see the message and the macro runs successfully. Only
the initial time the message is displayed.

How do I get the macro to run the initial time without having to
manually process the message box?

Thanks in advance for the help.

Randy

KLZA

Processing a Message Box w/in a Macro
 
Not enough info. Please post your code...

Randy wrote:
I could use help with the following;

I have a macro and when I run it, it displays a message box offering
three choices, "OK, Cancel and Help". When I choose "OK", the macro
continues to run to a successful conclusion. I want to process this
message box within the micro with the choice "OK". To accomplish
this I use the following code:

Application.DisplayAlerts = OK

When I run the macro initially, the message box still appears even
with this code. I click "OK" and the macro continues sucessfully. If
I run it a second time or subsequent times with the same or different
data, I do not see the message and the macro runs successfully. Only
the initial time the message is displayed.

How do I get the macro to run the initial time without having to
manually process the message box?

Thanks in advance for the help.

Randy



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

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