ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatic accept all pop up dialog box (https://www.excelbanter.com/excel-programming/365172-automatic-accept-all-pop-up-dialog-box.html)

Edmund

Automatic accept all pop up dialog box
 
While macro is executing. how do I get VBA to automatically select either
"YES€ or €œOK€ whenever any dialog box pops up asking for user input? I just
need VBA to automatically accept any €œYES€ as well as €œOK€, which pops up
during execution of macro.

To look through & modify the macro developers code will be like impossible.
Im VBA rookie. Is there a command line which I can insert at the top (after
Dim statement) which can automatically accept all pop ups along execution of
codes?

Thanks alot
--
Edmund
(Using Excel XP)

Norman Jones

Automatic accept all pop up dialog box
 
Hi Edmund,

Try:

Application.DisplayAlerts = False

'Your code

Application.DisplayAlerts = True


---
Regards,
Norman


"Edmund" wrote in message
...
While macro is executing. how do I get VBA to automatically select either
"YES" or "OK" whenever any dialog box pops up asking for user input? I
just
need VBA to automatically accept any "YES" as well as "OK", which pops up
during execution of macro.

To look through & modify the macro developer's code will be like
impossible.
I'm VBA rookie. Is there a command line which I can insert at the top
(after
Dim statement) which can automatically accept all pop ups along execution
of
codes?

Thanks alot
--
Edmund
(Using Excel XP)




NickHK

Automatic accept all pop up dialog box
 
Edmund,
I think the answer is basically "No".
But I assume you mean there is code like:

RetVal=MsgBox("Really quit ?", vbYesNo)
If RetVal=vbYes Then...

You could do a search and replace of "RetVal=MsgBox..." for "RetVal=vbYes"

NickHK

"Edmund" wrote in message
...
While macro is executing. how do I get VBA to automatically select either
"YES" or "OK" whenever any dialog box pops up asking for user input? I

just
need VBA to automatically accept any "YES" as well as "OK", which pops up
during execution of macro.

To look through & modify the macro developer's code will be like

impossible.
I'm VBA rookie. Is there a command line which I can insert at the top

(after
Dim statement) which can automatically accept all pop ups along execution

of
codes?

Thanks alot
--
Edmund
(Using Excel XP)





All times are GMT +1. The time now is 02:07 AM.

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