LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When calling Excel 97 Macro from Labview 5.1, get error: cant find macro!

I have a macro written that I am trying to call from Labview. To assist in this task I downloaded an Excel Macro VI off the NI Websight. The VI came with an excel workbook that included a sample macro. I can run the example with no problems. I then modified the VI to fit what I am trying to do. I can get it to work with the Sample excel macro but not the one I created (I get an error saying it can't find the Macro). I have played with the timing and that has not worked. I have also noticed that when I use the sample Macro, it will work fine for a while then after a random number of executions, it will stop working and I will get the same error as with my Macro. In order to get it working ag
ain, I have to remove the sample worksheet (macro) and replace it with the original copy. I have been pulling my hair out for a couple of days now with this one so any help would be greatly appreciated!
0 Kudos
Message 1 of 5
(3,226 Views)
Just a shot in the dark.

Shut off multithreading.

ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,226 Views)
I am not sure what the problem could be. The VI you speak of can be found at the following link:
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/190d1f351297ef9a862567740073e2bc?OpenDocument

I ran the program for excel 2000 on my LabVIEW 6.1 about 50 times and did not get the error you reported. Your macro should not be corrupted with use. Have you considered reinstalling excel? I liked the idea about turning off multithreading. Do you see the same behavior if you run in high light execution mode?

Jeremy Braden
National Instruments
0 Kudos
Message 3 of 5
(3,226 Views)
I have turned off multithreading and see the same error. Running in high light execution mode doesn't help either. I will try reinstalling Excel next. Several days ago I installed the "Data Access Objects" component into Excel to see if that would solve the problem (which it did not). Are there any components that you are aware of that I should or should not install?
0 Kudos
Message 4 of 5
(3,226 Views)

 

Did you ever solve this?

I have the exact same problem using LV2009 and Excel2003

0 Kudos
Message 5 of 5
(2,813 Views)