Information générale
Titre:
Visual FoxPro 5.0 and Excel'97
Hi,
I have a problem with OLE instances of Excel. . .
I'm creating an OLE instance of Excel for reporting purposes(using: thisform.oExcel=CREATEOBJECT("Excel.Application")), which I am then able to write data to and manipulate via OLE. The user can save this and then if he wants, shut down Excel.
However, if after the user has manually closed Excel, he then attempts (in the same session) to write to Excel for a second time. The system loads an instance of Excel that seems to be ScreenLocked (for want of a better description) and does not show the new workbook. - You get a GUI scenario similar to that after issuing thisform.screenlock =.T. in VFP.
In VFP I have tried detecting for a .null. object or even testing the type of "thisform.oExcel.name" - hoping that it might be "U" if excel has been closed down. - Even though excel is closed this still returns "C".
I assume that my object handle in VFP "won't let go of Excel", so how do I detect that Excel has been closed? or How do I re-establish a closed instance of Excel, so that I can re-use it?
Any help would be much appreciated.
Regards,
James.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement