Skip to main content

Immediate window

Table of contents
  1. Keyboard shortcuts

The Immediate window can be dragged and positioned anywhere on your screen unless you have made it a dockable window from the Docking tab of the Options dialog box.

Allows you to:

  • Type or paste a line of code and press ENTER to run it.
  • Copy and paste the code from the Immediate window into the Code window, but does not allow you to save code in the Immediate window.

You can close the window by selecting the Close box. If the Close box is not visible, double-click the title bar to make the Close box visible, and then select it.

Keyboard shortcuts

Use these key combinations in the Immediate window.

Press To
ENTER Run a line of selected code.
CTRL+C Copy the selected text to the Clipboard.
CTRL+V Paste the Clipboard contents at the insertion point.
CTRL+X Cut the selected text to the Clipboard.
CTRL+L Display Call Stack dialog box (break mode only).
F5 Continue running an application.
F8 Execute code one line at a time (single step).
SHIFT+F8 Execute code one procedure at a time (procedure step).
DELETE or DEL Delete the selected text without placing it on the Clipboard.
F2 Display the Object Browser.
CTRL+ENTER Insert carriage return.
CTRL+HOME Move the cursor to the top of the Immediate window.
CTRL+END Move the cursor to the end of the Immediate window.
SHIFT+F10 View shortcut menu.
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.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>