Szerkesztés

Megosztás a következőn keresztül:


Continue code execution

When you run your code, execution may stop if:

  • 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 (Tools menu).

  • A previously set 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, which you set to break when the value has changed or break when the value is true, is encountered.

To halt execution manually

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

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

To continue execution when your application has halted

  • On the Run menu, choose Continue (F5), or use the toolbar shortcut: image of toolbar button to continue, or...

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

To continue execution when your application has halted because of a handled error

  • Press ALT+F8 to step through the error-handler, or...

  • Press ALT+F5 to resume execution by running through the error-handler.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.