"Can't Execute Code in Break Mode" When Running Macro
This article was previously published under Q177828
This article has been archived. It is offered "as is" and will no longer be updated.
In the versions of Microsoft Excel listed above, if you attempt to run amacro, one or more of the following problems may occur:
- If you click the Tools menu and point to Macro, one of the following problems may occur if you click the Macros menu item:
- Nothing happens; the menu does not disappear, and the Macro dialog box is not displayed. You cannot click the Macros menu item.
- The menu disappears, but the Macro dialog box is not displayed.
- If you attempt to run a macro, either from the Macro dialog box, from within the Visual Basic Editor, or by pressing its shortcut key, you receive the following error message:Microsoft Visual Basic
Can't execute code in break mode
These problems will occur if, when you attempt to run a macro, anothermacro is currently in break mode. This may occur if you have added abreakpoint to a macro by selecting a line of code and pressing F9, or if amacro contains the following line of code:
To exit break mode, activate the Visual Basic Editor by clicking the Toolsmenu, pointing to Macro, and clicking Visual Basic Editor. Then, either:
- On the Standard toolbar, click the Reset button. This halts all macro execution. -or-
- Either click the Continue tool on the Standard toolbar or press F5. The halted macro will continue its execution.
This behavior is by design of the versions of Microsoft Excel listed atthe beginning of this article; it is not possible to run a Visual Basicmacro when another macro is in break mode.
XL97 XL98 ALT+F8 Microsoft Visual Basic Can t execute code in break mode XL
Article ID: 177828 - Last Review: 12/05/2015 08:13:14 - Revision: 1.3
Microsoft Excel 97 Standard Edition, Microsoft Excel 98 for Macintosh
- kbnosurvey kbarchive kberrmsg kbprb KB177828