Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Macro Question
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel Macro Question
Miscellaneous
Thread ID:
00479873
Message ID:
00479873
Views:
62
How to I pass a parameter to an Excel macro?

The code I have is:


cFileName = GETFILE("txt")

oExcel = CREATEOBJECT("Excel.Application")
oExcel.Workbooks.Open("MyWorkbook.Xls")

oExcel.Application.Run("MyWorkbook!MyMacro(" + cFileName + ")")


The last line is failing.

Can anyone tell me the correct syntax?

TIA
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform