03-02-2010 11:14 AM
When i use the excel remove module (Report Generation Toolkit) i have to put a reference of the macro.
Can everybody hepl me?
03-02-2010 11:25 AM
Maybe I didn't understand your question..
Are you loading a macro then you want to remove it? I am asking that because you are using the remove module.vi.
Are you trying to do what is shown in the image below?
Typically, you would have to import the module, run the macro and then remove module.
Is the macro being called using LabVIEW? Or are you trying to remove an already existing macro that was created in Excel (outside LabVIEW)?
03-02-2010 11:43 AM
03-02-2010 12:16 PM
You may need to use ActiveX instead..
03-02-2010 12:41 PM
03-02-2010 12:53 PM - edited 03-02-2010 12:54 PM
You may need to read some details from the Microsoft site to determine what ActiveX properties will do the trick.
I had a quick look in the ActiveX property & invoke nodes but did not see anything at first glance.
Here's how you work with ActiveX in LabVIEW.
On the block diagram, look in the functions palette for Connectivity and select ActiveX.
Inside it you'll find Automation Open.vi Put it on the block diagram. Right clickAutomation Refnum and select "Select ActiveX Class".
You then browse all the way down to Microsoft and look for Excel. I tired the latest, which does not necessairily mean the correct class.
So on the Microsoft website, you should be able to find info on the correct class and property that you need to work with.
You will then need the appropriate invoke or property node that matches what you are looking for, as shown in the image below:
Hope it helps.
R
03-02-2010 03:03 PM
I've made it this way. You have to choose the excel_workbook reference. Important is to check the macro security options in excel. I dont know the english words for the option. Index is the name of the module to remove.
03-02-2010 03:50 PM - edited 03-02-2010 03:50 PM
Well done! And thanks for sharing.
🙂