To open the Immediate window, pull down the VB View menu and choose Immediate
Window. The Immediate window will appear.
The Immediate window enables programmers to do the following three things:
Display messages programmatically with the Debug object
Query or modify data values on-the-fly
Test and execute VB procedures
The first two capabilities are only available when a program is in Break mode.
Messages can be programmatically displayed in the Immediate window by embedding
certain statements in a program. This entails use of a built-in VB object called
the Debug object.
Unlike the fixed response in the other windows that can be used to monitor
the state of variables and properties, the Immediate window also permits programmers
to interactively inquire about these values, or even to change a value at will.
The last capability doesn’t require that a program be running in Break
mode, or even that a VB program be running at all. At design time, the Immediate
window can be used to test code or execute commands without actually running the
application under development. If you want to find out what value a function returns,
for example, you can enter and run the function in the Immediate window.