Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel - Macro execution
Message
De
06/07/2000 15:25:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00389030
Message ID:
00389061
Vues:
19
Thanks a lot Larry

>>I need to execute an Excel macro from within VFP. I already have the code to open the worksheet and close it once the macro has finished. However I can't find the way to launch such macro.
>>
>>
>>Thanks in advance for any help.
>>
>>Oscar Corte
>
oExcel = createobject("excel.application")
>With oExcel
>   .Workbooks.Open("MySpreadsheet.XLS")
>   .Run("MyMacro")
>   .Workbooks(1).Close()
>Endwith
>The macro must be public. This means if it doesn't show up in the Tools - Macro - Macros list, it can't be run.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform