Show the immediate window in Excel VBA – How to

Show the immediate window in Excel VBA – How to

Show the immediate window in Excel - How to

This quick tip shows you how to show the immediate window in Visual Basic for Applications (or VBA) for Excel .

Show the immediate window

The immediate window allows you to test single lines of code. In most cases, you use Debug.Print to run single line commands in VBA.

The video

So, here is a quick video showing you how to display the immediate window in VBA.

Basically, all you have to do is (1) click on Developer from the menu. Then, (2) select Visual Basic from code group. In VBA, click (3) View from the menu. Lastly, select (4) Immediate Window from the View menu. Finally, you will see the Immediate Window in VBA.

Test it out

Once you get the immediate window open, try typing some commands. So, for starters, one thing you can test is displaying the contents of a cell. Try this…

  1. Type something in a cell, such as Hi or Hello in cell A1.
  2. In the immediate window, type Debug.Print Range(“A1”).Text and press Enter. As a result, it should show whatever value you have in cell A1.
 

Affiliate stuff – Move up and excel with Excel