Locked lesson.
About this lesson
Exploring the benefits of the Immediate window for logging and querying, as well as writing when needed.
Quick reference
Using the Immediate window
Using the Immediate window.
When to use
The Immediate window allows you to change values at runtime and question the state of a variable.
Instructions
Opening the Immediate Window
- Go to the View menu on the main toolbar and select Immediate window
- Alternately you can press CTRL + G
Using the Immediate window directly
- Query anything by typing a question mark (?) followed by code pointing to an object or variables properties
- Execute a method by typing it directly into the window and pressing Enter
Writing values to the Immediate window at run time
- Insert a Debug.Print command in the code and the output will display in the Immediate window.
- Debug.Print commands can be left in the code once the routine is ready to use, but it will take extra time for them to be calculated.
- If a Debug command is left in the code, you can add a single quote (‘) at the beginning to prevent it from executing.
Lesson notes are only available for subscribers.