Printing VBA variable values to Excel
Any help with this problem would be greatly appreciated.
I've created a 'variable tree' using nested user-defined types. So, for
example, I have variables of the form: size.large.width and
size.large.height where 'size' and 'large' are user-defined types
and 'width' and 'height' are, say, integer types.
Is it possible to print all the variable values to an Excel sheet
without having to loop explicitly over all the variables in the top-
level container variable ('size' in my example). This would make my
code much more robust (in case I edit the list of variables at a lower
level in the tree) and a lot shorter (in my real program, there
are hundreds of variables contained in each top-level container
I guess this problem could be solved by referencing the variables using
something like: size.large.item(2) instead of size.large.height.
Getting the values into Excel is not the problem, its obtaining a
dynamic list of those variables that I cannot currently do.
Thanks in advance
Sent via Deja.com