tags:

views:

114

answers:

2

I'm writing a program, with VBA, in order to manipulate Microsoft Project.

But i have some troubles and i want to do some debug. How can I open a command line in order to see what's going on with some printfs which appear in the command line?

+1  A: 

Can't you do your debuging with MsgBox? I think that will be way easier than getting VBA to spawn a command line. Actually I don't even get why you want to do that since there's a debugger included into VBA...

hth

K

KB22
I see your point... I have a debugger but I do a lot of processing in my code and the command line with prints will allow me to know what kind of information am I processing at the moment.you understand?
UcanDoIt
I C, have you tried to output for debug information into a list box for example? should be piece of cake with vba.
KB22
+1  A: 

To open a command line from VBA you can use the Shell function (shell("cmd.exe"))

But for debugging VBA applications, the immediate window (alt+g) is a very, very nice feature.

Instead of doing printfs to a command line window you put some debug.print statements and watch them from the immediate window. You can also pause execution and lookup/modify variables values in real-time.

Hope that helps

Marcand