Dear Folks,
I have a LabVIEW app that writes report data out to disk as a tab-delimited
text file, then triggers an Excel macro. The excel macro is an auto-open
macro, so I have a vi which opens the macro.xla file, then an ActiveX call
from LV that tells Excel to run the auto-open macro. This has worked fine
in the past, for previous projects, but on a recent project (in which I
copied over the same vi's from the old project) I could not get it to work.
Now labview opens the text file in excel, opens the macro.xla file, then
instead of running the macro Excel just closes both files and nothing seems
to happen. I tried several different things with timing, thinking maybe the
text file wasn't completely open when the macro was triggered, or some
such, but to no avail. I put a pop-up message box in the macro at the
start, and that works, it pops up, but after I dismiss it I see the same
behavior.

This morning, I loaded my old app, and to my surprise it no longer worked
either. The only change in Excel is I recently upgraded to Office XP, so
now it is Excel 2002 vs maybe Excel 2000 before. I have had to fiddle with
the ActiveX calls before for changes in Excel, but I tried all the usual
fiddling (delete and redrop the invoke/property nodes, change the property
to something else and back again, recompile the vi) made no difference.
Does anyone else have any experience with this? I am really doing very
little with ActiveX, just having Excel open a text file, open a macro file,
and run the xlauto_open macro, then waiting until the number of open
worksheets goes to 0 so I can close Excel.

Thanks in advance,
Alvin

Alvin W. Moore Jr.
Measurement Systems Programmer
Research, Development, and Engineering
Corning Cable Systems
Hickory, NC


Reply via email to