Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-07-2020, 06:30 AM
John 4 John 4 is offline Make Watch list variables available to all procedures? Windows 10 Make Watch list variables available to all procedures? Office 2013
Advanced Beginner
Make Watch list variables available to all procedures?
 
Join Date: Oct 2019
Posts: 68
John 4 is on a distinguished road
Default 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?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Watch list variables available to all procedures? Best way to make variables in one sub available to a called sub Jennifer Murphy Word VBA 2 02-29-2020 12:18 AM
Why isn't watch list sorted? Jennifer Murphy Word VBA 0 02-23-2020 08:20 PM
Onenote and Apple watch Powell64 OneNote 0 06-04-2017 03:00 PM
Array to iterate through variables and trap blank variables Marrick13 Word VBA 5 08-04-2015 06:19 AM
can word: make variables, find appropriate pages, fill out pages with variables, print only those 20GT Word VBA 1 10-15-2014 09:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft