Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Values of Variable after Project has Run
Hi
Is it possible to check the values of all the public variables after the subs have run. These are public and module declared variables. As I understand it, the Locals window is not of any help I can think of way of "cobbling" something together but wondered if anyone has something almost "ready to go" I realise the procedure may need to be called for each variable. Thanks Tim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Values of Variable after Project has Run
You can add a "Watch" on public variable. You have to set up each Watch
individually -- you can't say "Watch All Globals" Suppose you have code like Public Y As Long Public X As Long Sub AAA() X = 123 Y = 321 End Sub Sub BBB() X = 333 Y = 444 End Sub In VBA, go to the Debug menu, choose "Add Watch", enter the variable name in the "Expression" box, choose "(All Procedures)" in the Procedure box, choose "(All Modules)" in the modules dropdown, and choose "Watch Expression" in the Watch Type frame. Repeat this procedure for each variable you want to watch. It will show you the value of the variables even after a procedure is finished. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "Tim Childs" wrote in message ... Hi Is it possible to check the values of all the public variables after the subs have run. These are public and module declared variables. As I understand it, the Locals window is not of any help I can think of way of "cobbling" something together but wondered if anyone has something almost "ready to go" I realise the procedure may need to be called for each variable. Thanks Tim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Values of Variable after Project has Run
Hi Chip, Tom
Many thanks for those solutions Tim "Tom Ogilvy" wrote in message ... assume you have a public variable name MyVar make the immediate window visible (and the project with the variable the active project) and in the immediate window do ? MyVar -- Regards, Tom Ogilvy "Tim Childs" wrote: Hi Is it possible to check the values of all the public variables after the subs have run. These are public and module declared variables. As I understand it, the Locals window is not of any help I can think of way of "cobbling" something together but wondered if anyone has something almost "ready to go" I realise the procedure may need to be called for each variable. Thanks Tim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Exporting MS Project Values into Excel | Excel Worksheet Functions | |||
Project values? | Excel Worksheet Functions | |||
Compile Error: Expected Variable or Procedure, Not Project | Excel Programming | |||
How can I project the values of intersection of curves in chart on | Excel Worksheet Functions | |||
project values based on other values | Excel Discussion (Misc queries) |