From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Hi, when opening Excel template from within LabVIEW and the customer closes Excel accidentally outside LV will create big troubles. I've got a hint to prevent closing Excel outside LV but never succeeded ordently with that. Has anybody tried to use Excel macro to to do the thing. I'm not very used to use Excel macros. Any good hints. I use LV 7.0-7.1 with Microsoft Report Generation toolkit v.1.01. Thanks Eki
In response to your question, I do not believe macros will prevent a user from closing an Excel file. Macros are comparable to scripts that help automate a task that you may want to run repeatedly. To workaround your problem, you can have LabVIEW automatically reopen an Excel file if it has been closed outside of LabVIEW. Otherwise, if LabVIEW is generating any errors with the Excel file not open, you have incorporate error handling in your program and subsequently reopen Excel.
Hopefully this will give you some pointers to solving your issue. Good luck!
Kileen C. Applications Engineer National Instruments