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

Levels of Scope - Module Scope

If you want to monitor an expression as it changes throughout an entire module, you don’t need to create individual procedure-level watches for each routine contained in the module. Instead, you can set a single watch that applies to an entire module.

To define a watch at the module level, use either the Add Watch dialog box (to create a new watch) or the Edit Watch dialog box (to modify an existing watch). Just as with a procedure-level watch, you still need to select the appropriate module from the Module combo box.

As before, the next step is to select an item from the Procedure combo box’s drop-down list. Instead of selecting a particular procedure name, however, select the item that says (All Procedures).

(All Procedures) is the first item contained in the drop-down list. By selecting (All Procedures), your watch is automatically activated for every procedure contained in the currently selected module.

A module-level watch
FIGURE 18.25 A module-level watch

Figure 18.25 shows how to use the Edit Watch dialog box to change the local watch you set in the preceding section into a module-level watch.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved