Calculator tape debug window

T

Top Spin

I would like to set up some kind of an "output window" for debugging
purposes that would behave like a calculator tape. I could write a
little subroutine that would cause a text string to be displayed on
the next line in that window so I could follow what's happening in the
program. I would then insert calls to the subroutine at various places
in the code like this:

....
Call DebugWindow("XYZ routine..."
....
Call DebugWindow("i=" & i)
....

Can someone point me in the right direction to get started on this?

Is there a better way to accomplish this?

Thanks
 
J

Jonathan West

Top Spin said:
I would like to set up some kind of an "output window" for debugging
purposes that would behave like a calculator tape. I could write a
little subroutine that would cause a text string to be displayed on
the next line in that window so I could follow what's happening in the
program. I would then insert calls to the subroutine at various places
in the code like this:

...
Call DebugWindow("XYZ routine..."
...
Call DebugWindow("i=" & i)
...

Can someone point me in the right direction to get started on this?

Is there a better way to accomplish this?

In the VBA editor, press Ctrl-G to open the Immediate window. This does
exactly what you are asking for.

Within your program you can use the Debug.Print command to print value to
the immediate window. You can also do on-the fly calculations and commands
by typing in the immediate window.
 
T

Top Spin

Within your program you can use the Debug.Print command to print value to
the immediate window. You can also do on-the fly calculations and commands
by typing in the immediate window.

Debug.Print does exactly what I wanted. Thank you.
 
Top