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.