Global Keys
TOC
Collapse the table of content
Expand the table of content

Global Keys

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Use these key combinations in all Visual Basic windows:

Press

To

F5

Run a Sub/UserForm or macro.

F8

Execute code one line at a time.

SHIFT+F8

Execute statements one line at a time without stepping into procedure calls.

CTRL+BREAK

Stop running a Visual Basic application.

CTRL+G

Displays the Immediate window.

CTRL+TAB

Switch between windows.

ALT+F5

Runs the error handler code or returns the error to the calling procedure. Does not affect the setting for error trapping on the General tab of the Options dialog box.

ALT+F8

Steps into the error handler or returns the error to the calling procedure. Does not affect the setting for error trapping on the General tab of the Options dialog box.

Use these key combinations in all Windows-based applications:

Press

To

F1

Open Help.

ALT+F6

Toggle between the last two active windows.

ALT+F4

(Visual Basic) Close the active window; if all windows are closed, close Visual Basic.

CTRL+C or F3

Copy the selection to the Clipboard.

CTRL+X

Cut the selection to the Clipboard.

CTRL+V

Paste the Clipboard selection.

CTRL+Z

Undo the last edit.

SHIFT+F10

View shortcut menu.

Show:
© 2016 Microsoft