Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting excel macro to VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00261234
Message ID:
00261427
Vues:
33
Tom;

Thanks for the help. That got me quite a bit further, but at runtime now I get the error: 'Sheets' is not an array.

If you have any other ideas I would be glad to hear them.

Thanks
John

>John,
>
>VFP does not recognize VB's named parameters. Try this
>oExcel.ActiveChart.SetSourceData(Sheets("cheqsale").Range("AB4:AB8"),xlColumns)
>If SetSourceData requires more than two parameters, you may have to insert commas to indicate any blank parameters. VFP will accept the blanks.
>
>To check the Excel type definitions, you can use the Object Viewer in Excel's VBA editor or VFP's Class Browser. The file you are lookig for is in an Office sub-directory and named "Excel*.olb". The * is the version number for Excel. The syntax can change with newer versions.
>
>You might want to download a VB to VFP parsing form that Kamel Patel is posting at http://www.flashcreative.com .
>
>Tom Molloy
>
>
>>
>>Hi;
>>
>>I am trying to convert an excel macro for inserting a chart into vfp code and am having a problem with the two macro lines below (the second line starts with 'PlotBy'):
>>
>>ActiveChart.SetSourceData Source:=Sheets("cheqsale").Range("AB4:AB8"), _
>> PlotBy:=xlColumns
>>
>>I have tried (and numerous other possibilities):
>>
>>
>
>>I am using an excel.h file for constants.
>>
>>Any ideas would be appreciated.
>>
>>John
John Campbell
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform