Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Macro
Message
From
30/03/2000 09:27:54
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
29/03/2000 15:53:43
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00352122
Message ID:
00352693
Views:
9
>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
Map
View

Click here to load this message in the networking platform