Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple versions of Excel and GetObject/CreateObject
Message
From
16/11/2007 13:31:50
 
 
To
16/11/2007 12:07:05
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01269423
Message ID:
01269487
Views:
24
>Borislav--
>
>>Use version:
>>
>>oExcel = CREATEOBJECT([Excel.Application.8]) && If I am not mistaking Excel 2000 has 8th version. but you should check.
>>
>
>
>Thanks.
>
>Excel 2000 is 9. CreateObject accepts this syntax. GetObject appears not to. Any thoughts.
>
>Tim

That's because GETOBJECT uses whatever is currently running. Version makes no difference. You could check the version via automation once you've gotten the object reference.
oX = GETOBJECT(,"Excel.Application")
?oX.Version   && Excel2003 is 11.0
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform