View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Output a string to the console?

HI

Maybe this is what you need.
You can output to the Immediate window, which you can see in the VBA editor.

Debug.Print "Hello world"

Regards,
Per

"Toby Erkson" skrev i meddelelsen
...
I'm looking for a simple way to output to the console (command line
window?). Can this be done in VBA?

The reason: I have a scheduler that can monitor the task it has executed
and capture any console output for later inspection. I want this as I
would like to send text to the console when an error occurs to help me
figure things out. I don't want a log file.

If you're familiar with VBScripting then what I'm looking for is something
like this -- wscript.echo "Hello world!".

TIA!