Re: Sending debugging messages to a second document.



Jay:

With some minor modification, your example code is working, up to a point.
Apparently the OS or Word or something is buffering the writes to the log
file. By the time the macro hangs, only a small portion of the trace
statements have been written out; the rest are lost when the hang occurrs.

Can you tell me how to force immediate writes to the log file, so that I
don't lose state of the macro at the time or the error?

Thank you for your help.

--
Barry Carroll

(Cleverly disguised as a trained SW engineer.)
---------
Datalogic Scanning, Inc. assumes no responsibility whatsoever for any
statements made by me. I''m entirely on my own here.


"Jay Freedman" wrote:

Barry wrote:
I am debugging a VBA subroutine that hangs under certain conditions.
In order to pinpoint the spot in the code where the hang occurs, I
want to write trace data to a second document, where they will not
interfere with the text and ActiveX controls being added to the
target document. I know that this is pretty elementary VBA, but I've
never done it before and can't seem to make it work.

Can someone show me or point me to an example of how this is done?
Thanks in advance for any help.

See this thread from yesterday:
http://groups.google.com/group/microsoft.public.word.vba.beginners/browse_thread/thread/c0e61d07da657f08/2d848ae91240c9ea?hl=en&lnk=st&q=#2d848ae91240c9ea

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



.


Loading