Roger has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Viewing variable values
I have inherited a program with a large number of arrays declared in the General Declarations. I would like to look at the contents of these arrays. When stepping througn the program, they do not show up in the Locals window. Is there some way to make them do so?
Thanks
Roger
RE: Viewing variable values
Hi Roger
Thanks for getting in touch.
The Locals window certainly should show the values of arrays. You have specified that it's in the General Declarations area, so it is possible that they are not executed during the macro you happen to be stepping through?
Have you double-checked the variable is being populated at all? Perhaps try a MsgBox with the array name in? You could loop through the values to output the current values at some point in the code.
Sorry I can't help further at this point - try that out and see what happens.
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
RE: Viewing variable values
At the time I asked our local expert. He really is pretty good, but even he could not find the arrays. Anyway, since you said that they were supposed to be there I ran it on a different machine and there they were.
Strange things, computers.
Thanks for your help
Roger
RE: Viewing variable values
Hi Roger
Very strange. Let us know if it happens again!
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector