Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I detect if Excel is already running?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00158064
Message ID:
00158152
Vues:
19
>>How can I change the code to detect if Excel is already running and, if so, simply add a new Workbook to the existing Excel application.
>>
>
>Instead of CREATEOBJ(), use GETOBJECT(), which will use an existing instance of the server if it's available, or start one if it isn't:
>
>oExcel=GETOBJECT(,'Excel.Application')

Thanks for the suggestion. I tried but got the following error message

Error number: 0
Error message: OLE error code 0x800401e3: Operation unavailable.
Line of code with error: oExcel = GETOBJECT(, "Excel.Application")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform