General information
Category:
COM/DCOM and OLE Automation
>Nope, sorry. That's something I've never played with. I'm pretty sure it's covered in that book I mentioned though if you're able to find that anywhere.
The add-in appears to be a normal workbook which excel loads like a snap-in. As such, it probably conforms to the same method firing technique as a workbook, so you could probably try the same code.
excelsheet.Application.Run("xlFileName.xls!MACRONAME") becomes
excelsheet.Application.Run("xlAddInName.xla!MACRONAME")
Since the add-in should be automatically loaded, you don't need to worry about whether it's open.
I would suggest using Paul's original idea if the macro is only ever intended to be called from VFP. In my add-in example, i'm assuming that the USER will be calling the macro - so i wanted it available all the time. If VFP code is calling the macro, just open the workbook with the macro when you need it and save the overhead of loading the add-in even when you don't need it.
BTW, Paul - thanks again for the above code snippet.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only