Microsoft Office Tutorials and References
In Depth Information
To add a variable to the Watches window, right-click the variable name in your code and select
Add Watch from the popup menu. To add an expression to the Watches window:
1.
Move the editing cursor to any location in the code you are debugging.
2.
Select Add Watch from the Debug menu. VBA displays the Add Watch dialog box (see
Figure 22.10).
3.
Enter the desired watch expression in the Expression box.
4.
Make sure the Watch Expression option is selected.
5.
Click OK.
Each time the program enters break mode the display in the Watches window is updated. Then,
you can examine the values of your watch expressions to determine whether they reveal anything
about the bug you are working on. You can also edit a watch expression, or delete it from the
window, by right-clicking it and selecting from the popup menu.
FIGURE 22.10
Adding a watch expression to the Watches window.
Search JabSto ::




Custom Search