Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 18

Interacting with the Immediate Window

So far, you have been using the Immediate window as a sort of global message box. Although Debug.Print sends useful messages during program execution, it is also possible to type directly into the Immediate window. What can you type? For starters, you can use the same Debug.Print commands that you have been using so far in code. Figure 18.17 shows an example. The syntax is as follows:

Debug.Print "Insert Your Message Here"

Debug.Print commands can be entered directly into the Immediate window.
FIGURE 18.17 Debug.Print commands can be entered directly into the Immediate window.

Because the Debug object is the default object for the Immediate window, you can take advantage of some shortcuts. As this example shows, Debug.Print can be abbreviated either to Print or just ?. The method is invoked just as if you typed it completely, so you may as well save yourself that extra typing.

Besides printing messages, the Immediate window can perform a few other useful tricks when you use it interactively. You will look at those next.

  1. Querying or Modifying Data Values

  2. Testing and Executing VB Procedures


  

<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved