View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Thomas Lutz Thomas Lutz is offline
external usenet poster
 
Posts: 42
Default Data logging with a DDE link and VBA

A DDE Link should not cause any problems in an Excel spreadsheet as
long as the links are implemented correctly. It is more likely that
the problem is in whatever code is running every second. You may want
to throw in an error handler to record all the errors so that you can
track down what is going wrong.
A better way to do things might be to use the Excel SetLinkOnData
method to monitor the DDE data and trigger the macro that you are
currently triggering with a timer. The SetLinkOnData method lets you
configure a VBA subroutine to run automatically whenever data from a
DDE link changes. Using this approach, you would never miss a single
data value. With a timer taking a snapshot of the data every second,
you could easily miss data as well as record redundant data.


On Wed, 18 Jul 2007 11:58:00 -0700, Elceller in distress
wrote:

In other words I know what the equipment was doing every second
during a 7 hour shift. The program seems to work fine when I test it in the
office, without the link and without letting it run 7 hours. When I leave it
running on the machine the program crashes, I have not seen the error that
comes up.

Will a DDE link cause any type of error that can stop the program from
running?
Is there a way to program around DDE errors?

This is the only program running on this computer can windows cause it to
crash in any way?