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



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q213739

SYMPTOMS

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

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.

STATUS

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

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.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbpending kbProgramming KB213739