Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel: check if invocation successful
Message
De
13/02/2015 17:16:16
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01615261
Message ID:
01615318
Vues:
35
>About second question you can:
>
>m.loExcel = CREATEOBJECT( "Excel.Application" )
>
>Then just stop code and kill Excel with Task Manager or kill the Excel process with WMI.

Or m.loExcel.visible=.t. then bring it up (alt-tab to it) and close it manually.

BTW, I prefer to instantiate Excel as a property of the current object, and have it try to

this.oExcel.quit(0)
this.oexcel=null

in the object's .destroy() - works most of the time, and I don't end up with sixteen of them in memory (at least one of which has my document locked) that I have to shoot down one by one.

Also, when Excel (my experience is more with Word, though) becomes visible, it's most often as a pop-under, and you need to instruct your end user that it may be behind, or use some tricks to bring it forth (on which I'm short). There's also a frequent phenomenon whereas the app will remain invisible, but will have a new (also invisible) dialog asking for some user action that none of the previous versions had, and is not suppressed with the current set of suppress commands. For such situations, making it visible (at least while writing/debugging/pulling hairs) may reveal the existence of the hidden dialog.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform