Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: The Watch Window Does Not Use the Procedure Call Context


View products that this article applies to.

This article was previously published under Q213739

↑ Back to the top


Symptoms

The Watch window may not display the value of a watch expression in the appropriate context of the selected procedure call.

↑ Back to the top


Cause

This behavior can occur because when you run a procedure in the Immediate window as part of the debugging process for your macro, it is added to the list of procedure calls in the Call Stack dialog box. This functionality helps you trace the operation of your code. However, if you select a procedure in the Call Stack dialog box that is listed more than once, and then click Show, the current value of your watch expression does not change to the context of the selected procedure.

For example, if your watch expression is a variable, and you run a procedure in the Immediate window multiple times, and you then change the value of the variable each time, the Call Stack dialog box cannot be used to trace the different values of the variable. The value of the variable in the Watch window is the value at the last running of the procedure, regardless of the instance of the procedure call selected in the Call Stack dialog box.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


References

For more information about the Immediate window, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type use the immediate window in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB213739, kbprogramming, kbpending, kbbug

↑ Back to the top

Article Info
Article ID : 213739
Revision : 6
Created on : 10/11/2006
Published on : 10/11/2006
Exists online : False
Views : 225