LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel performed an illegal operation in labview

My application incorporates LabVIEW 6.0 and Excel(2000) using ActiveX.I perform operations on an excel file from labview like viewing a spreadsheet, chart, editing a spreadsheet and saving etc. Everything works fine. But once I stop the execution of my application in labview I get a diolog box saying "Excel performed an illegal operation and will be shut down" Whats happening? any idea? how do I debug this?
0 Kudos
Message 1 of 2
(2,443 Views)
It is critical when using ActiveX to control Excel that you close every Automation Reference used throughout your application in the reverse order in which they were created. If you don't, Excel will hang or crash.

If you create references to the Application, Workbook, Worksheet, Range and then a Cell, after you are done with the Cell, close the references to the Cell, Range, Worksheet, Workbook and Application. If you need access to the Worksheet later, keep the rest open until you are done with them.

Michael
http://www.stitchofclass.com
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 2
(2,443 Views)