VBA Editor Windows

Edit ArticleEdit Article

Immediate Window

Immediate Window is a console which collects the output messages printed from the code.

Immediate window is usually used in debugging and troubleshooting as a simple way to output the log or the current state of variables.

To enable this window click the View->Immediate Window command ot Ctrl+G shortcut.

Immediate Window Menu
Immediate Window Menu

Window can be docked to any panel in VBA Editor.

In order to output messages to this window use Debug.Print command

Dim str As String
str = "Hello World"
Debug.Print "Some Message"
Debug.Print str

Output in the immediate window
Output in the immediate window

Watch Window


All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.

Product of Xarial Product of Xarial