Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error launching Excel - after automation.

Status
Not open for further replies.

diarmaid

Programmer
Jun 27, 2003
34
IE

I am using automation to create Excel reports, if I create such an file from within my app and then try to launch Excel outside of automation (from my Desktop) I get an MS Error that MS wants me to submit etc. Then if I close my Excel session created above I notice that Task Manager still has an instance of EXCEL.EXE. Nornally if I launch my VFP create Excel function and then close the resulting Excel instance it also removes itself from Task Manager.

If however, Excel was already opened BEFORE I use my App to create Excel reports all works fine.

Any ideas anyone ?
 
Make sure that after your VFP app closes Excel, it sets the variable that was holding the reference to Excel to .null. That'll release it from the Task Manager:

oXL.Quit()
oXL = .null.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top