Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odd Excel behavior while being controlled from VFP
Message
De
06/04/2004 16:16:52
 
 
À
06/04/2004 03:35:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00892421
Message ID:
00892743
Vues:
19
Thanks. Your comments confirm what I suspected.

>>I'm creating and running an instance Excel from inside a VFP executable. The code that instantiates Excel is:
>>this.oExcel = CreateObject( 'Excel.Application' )
>>
>>I do pass the object reference to another object like this:
>>oRef = this.oExcel
>>
>>Then I release the object referred to by "this", without exiting the VFP application. What I'm seeing is this:
>>
>>If I quit Excel while the VFP application is running by going to File>Exit and then run the report that instantiates Excel again, when Excel opens, it retains a screenshoot of the application from the first time it ran. You can't see the new report that is supposed to be generated. My guess is that Excel is not releasing completely when the old report object is destroyed.
>>
>>I'd appreciate getting some ideas on how to get Excel completely gone while still being able to pass Excel to a new object reference.
>>
>>Ideas anyone?
>>
>>TIA
>
>Kenneth,
>You can't quit excel when there are references to it (you think you do but simply try this.oExcel.Show after you quit from excel - worse users might crash your app with C..5 depending on versions + how they close worksheets and excel itself. I've seen behavior differs if you use Ctrl+F4, Alt+F4, File\exit etc).
>Without going into details I'd say don't keep sort of public variables that holds a ref to excel.
>Cetin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform