Indirect Variables; List of Variable Names

D

David McCulloch

QUESTION-1:
From Excel VBA, can I obtain a list (i.e., array, etc.) of the global
variables and their values?

This would be similar to the code needed to emulate Excel's Locals window
that allows VBA programmers to see their variables at runtime.


QUESTION-2:
From Excel VBA, can I set a global variable without knowing its name until
runtime?

For example, if strVarName = "CustomerName", is there a way to indirectly
set CustomerName to a value such as with:

var(strVarName).value = "John Smith"?


Thanks for any help.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top