How to print two dimensional array in Immediate window in VBA ? Does it exist any generic method for doing this ? Some method for ploting one row of array per line in Immediate window could solve this problem, because then only thing to do is to loop this code for each line of array.
If this is for debugging purposes, it's not convenient to write a macro to view the contents of the array during program execution. Might even cause problems.
For debugging during program execution, you'll want a code-free method you can use across all VB projects, to spy the contents of your array.
In this example, "aLookList" is a variant array. The values under "Value2" come from a range.
Another answer here suggests using the Watch pane. This is similar to my answer, but poster did not explain that you can spy the entire array (all cells) by simply adding the array name to Watch. Then , drill down nodes. The advantage of the Locals Window over the Watch Window, is that with Locals pane, you do not have to manually add the array to the pane, it's already there. So it's a bit less effort.