Piping debug info to a txt file



Hi all,

Is there a way to, first, shell out command prompt and create a text file.
Then, pipe (append) debug info, such as variable values at different stages
into the text file. I tried to do a debug.print, but it gets cut off after a
certain number of times. By the time code execution is done, only the end
portion appears in the immedidate windows. The top portion is chopped off.




Rick Rothstein \(MVP - VB\)

You can use the Open statement to open a file in Append mode and Print
whatever you are now Debug.Print'ing to it instead. The exact set up depends
on where you are running your code from, but I'm thinking something like

Start your output session before you run your code...

FF = FreeFile
Open "c:\temp\yourfilename.txt" For Append As #FF

Run your code and use this to write what you now Debug.Print...

Print #FF, <<Your Output Text>>

When your code is finished, don't forget....

Close #FF


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