Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 2.13 KB

stop-code-execution.md

File metadata and controls

44 lines (26 loc) · 2.13 KB
title keywords f1_keywords ms.assetid ms.date ms.localizationpriority
Stop code execution (VBA)
vbhw6.chm1008937
vbhw6.chm1008937
f0608ca1-d6d8-d722-cbd7-8a31634264ed
12/27/2018
high

Stop code execution

As you run your code, it may stop executing for one of the following reasons:

  • An untrapped run-time error occurs.

  • A trapped run-time error occurs, and Break on All Errors is selected on the General tab of the Options dialog box.

  • A breakpoint is encountered.

  • A Stop statement in your code is encountered, switching the mode to break mode.

  • An End statement in your code is encountered, switching the mode to design time.

  • You halt execution manually at a given point.

  • A watch expression that you set to break if its value changes or becomes true is encountered.

To halt execution manually

  • To switch to break mode, from the Run menu, choose Break (CTRL+BREAK), or use the toolbar shortcut: image of toolbar button to switch to break mode.

  • To switch to design time, from the Run menu, choose Reset <projectname>, or use the toolbar shortcut: image of toolbar button to switch to design time.

To continue execution when your application has halted

  • From the Debug menu, choose Step Into (F8), Step Over (SHIFT+F8), Step Out (CTRL+SHIFT+F8), or Run To Cursor (CTRL+F8).

See also

[!includeSupport and feedback]