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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Avoiding redundant calculations 7
ticker tape 2
A coding style question 5
calculation with NOT EQUAL TO 6
debugging 2
Using Like operator in VBA 6
Output an Access Table or Query to Excel 0
VBA search & replace 4

Top