Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Macro
Message
De
30/03/2000 09:27:54
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
 
À
29/03/2000 15:53:43
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00352122
Message ID:
00352693
Vues:
10
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform