This documentation is archived and is not being maintained.

Continue Code Execution

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

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: Gg251695.tbr_brk_ZA01201682(en-us,office.14).gif.

  2. To switch to design time, choose Reset <projectname> from the Run menu, or use the toolbar shortcut: Gg251695.tbr_end_ZA01201701(en-us,office.14).gif.

To continue execution when your application has halted

  • On the Run menu, click Continue (F5), or use the toolbar shortcut: Gg251695.tbr_strt_ZA01201751(en-us,office.14).gif. – Or –

  • On the Debug menu, click 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.

Show: