General information
Category:
COM/DCOM and OLE Automation
>Just one thing though. I recorded a macro as I opened up one of my w/s, and got:
>
>Workbooks.Open Filename:="C:\Temp\exports\C3AN0200.XLS"
>
>After I've exported my VFP table to excel I want to open the w/s and change the col. headings to those of my field captions. Do I take it that this would translate, in VFP, to something like:
>
>loExcel.Workbooks.Open Filename:="C:\Temp\exports\C3AN0200.XLS" ?
>
No, VFP doesn't use named parameters. When you translate from a macro to VFP Automation code, you have to replace named parameters with positional parameters. Your example becomes:
loExcel.Workbooks.Open("C:\Temp\exports\C3AN0200.XLS")
In general, the Excel VBA Help file is invaluable here. In addition, as others said, the book Della Martin and I wrote has a lot of this in it, as well as a whole chapter really devoted to the question of how you learn what commands are available.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only