Make Watch list variables available to all procedures?
I often use the same variable names in more than one procedure (especially when I have a macro broken up into different subs/procedures for debugging before adding them all together). So for example, I might be using "Rng1" and "Rng2" in 3 or 4 different subs.
The Watches list appears to give me the option of having them all available for whatever sub I happen to be running at any given time. i.e. if I right-click on the variable name in the watch list and click 'Edit Watch' a window opens where I can select "Context - All Procedures".
However, when I do so and step through the sub with the F8 key, the Watch list window says (beside the variable name) "Expression not defined in context". This happens regardless of whether the "Module" section of the Edit Watch window has the module name selected (in which are the various subs), or whether "All Modules" is selected.
What am I doing wrong?
|