Problem description: Could not interrupt a running macro Steps to reproduce: 1. write simple macro such as sub no_way_to_interrupt_me for i = 1 to 1000 msgbox "hello" next end sub 2. Press F5 to run macro 3. Try to interrupt it, keys like break, Ctrl x, or the F-keys did not work to stop the macro Current behavior: macro runs until the loop ends Expected behavior: keys like Ctrl + break or esc should stop the macro Operating System: All Version: 3.6.0.4 release
Well, actually there is a way to stop running macro. In my system, with default settings, the corresponding combination is Shift+Ctrl+Q. To test, you may create a macro with this: while true wend and run it. It will run in background, but if you look into IDE, you will see that it runs. If you use the combination, a dialog pops up saying that macro has been stopped. Your case is an edge case. The msgbox routine creates a modal dialog that intercepts all input and has no special processing of hotkeys. So, whatever you press while the message box is up, it will not reach LO. When you close the message box, another one pops up immediately, giving you no time to use the hotkeys. If you have no other LO windows open at the moment, you will have to close all the boxes. But I doubt that this is a real-life issue. If you develop the macro, and have IDE open, you may use its controls to stop the macro. Other LO windows are not blocked by the message boxes, so the hotkey will stop it. I close it as NOTABUG. But if you feel that it is incorrect, please reopen it. Don't forget to describe your point. You may, for instance, want to make this an enhancement request to enable the modal dialog boxes to process the macro-terminating hotkeys.