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
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
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
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