-
Solved: Determine Variables and Values
Is there a way to determine what variables are currently set in VBA, their format, and their current value?
I'm running VBA code written by someone else and I'd like to be able to "trap" the above information & record the variable settings to a worksheet ....something like:
x = 1
r = 1
Do
Cells(r,1) = Variable(x).Name
Cells(r,2) = Variable(x).Format
Cells(r,3) = Variable(x).Value
r = r + 1
Loop Until x => ???
-
Are you just trying to see what the code does?
If so you could use the various debug features. eg the Locals Window, the Watch Window, breakpoints etc
-
Actually, I want to be able to capture and save the variable values, so upon subsiquent executions of the same template, I might be able to re-load the same values (and start where I left off).
-
Well I'm afraid you can't refer to variables like this.
-
All of my hopes and dreams just vanished.
Thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules