General information
Title:
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only