Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invoking Excel Macro From Within Foxpro
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Invoking Excel Macro From Within Foxpro
Miscellaneous
Thread ID:
00259829
Message ID:
00259829
Views:
50
I need to invoke a Excel macro, stored in personal.xls, within the workbook/sheet ast1.xls. The code now is:

*=====
* Create a reference to Excel
objExcel = CreateObject("Excel.Application")

* Open personal workbook
cFileName = "w:\work\output\personal.xls"
objBook = objExcel.WorkBooks.Open(cFileName)

* Open ast1 workbook
cFileName = "w:\work\output\ast1.xls"
objBook = objExcel.WorkBooks.Open(cFileName)

* Make Excel visible so you can see the show
objExcel.Visible = .T.

*INVOKE THE MACRO
application.run "personal.xls!macro1"
*=====

Everything opens fine, but the macro is not invoked.
Any ideas that would make this work?

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform