none
Using VBA code to interact with or interrupt an external macro RRS feed

  • Question


  • I have a macro that is calling another macro in an external workbook (created by a third party so I don't have access to the macro source code). The external macro currently executes and finishes by displaying a 'Done' message box. Is there any way for me to (a) suppress the message box OR (b) pass a command to simulate pressing 'OK' on the message box OR (c) interrupt the external macro at this point? 

    Excel 2016 on Windows

    Note this is cross-posted at http://www.msofficeforums.com/excel/37903-using-vba-code-interact-interrupt-external-macro.html as I'm not sure of the correct website to use. Apologies if this is not good practice!
    Tuesday, January 16, 2018 4:33 PM

Answers

  • It is fairly complicated - you need a second app started to be able to kill the message box:

    https://stackoverflow.com/questions/41820138/programmatically-dismiss-a-msgbox

    • Marked as answer by TishyMouse Tuesday, January 16, 2018 8:18 PM
    Tuesday, January 16, 2018 7:17 PM

All replies

  • It is fairly complicated - you need a second app started to be able to kill the message box:

    https://stackoverflow.com/questions/41820138/programmatically-dismiss-a-msgbox

    • Marked as answer by TishyMouse Tuesday, January 16, 2018 8:18 PM
    Tuesday, January 16, 2018 7:17 PM
  • Brilliant, thanks that works perfectly!
    Tuesday, January 16, 2018 8:18 PM