Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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.

Thanks,

Ben



--

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Piping debug info to a txt file

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
this:

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

Rick


"Ben" wrote in message
...
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.

Thanks,

Ben



--


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete info from source file w/out changing the destination file TB New Users to Excel 0 May 26th 08 06:26 PM
What is the best way of collectiong as much debug info as possible when users hit problems. Chrisso Excel Programming 3 June 12th 07 05:20 AM
Macro sends Excel file by Outlook - works in debug - not realt Prabha Excel Programming 2 December 8th 05 02:18 PM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
How would I select output to a file or Debug? Toby Erkson[_3_] Excel Programming 2 December 17th 04 01:56 AM


All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"