ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel.exe not terminated after spreadsheet saved (https://www.excelbanter.com/excel-programming/303589-excel-exe-not-terminated-after-spreadsheet-saved.html)

Zachary Hilbun

Excel.exe not terminated after spreadsheet saved
 
I create an Excel spreadsheet from VC++ and save it. After I am done an
EXCEL.EXE Process is visable in the Task Manager. After creating several
spreasheet I have several EXCEL.EXE around. Why are these not being
terminated?

p_excel-objBook.Save ();
p_excel-objBook.Close (COleVariant ((long) 1), VOptional, VOptional);
p_excel-objApp.SetVisible (false);
p_excel-objApp.SetUserControl (false);
//objApp = NULL; // doesn't help
//objRange.Quit ();
p_excel-objRange.ReleaseDispatch(); // doesn't help
p_excel-objRange = NULL; // doesn't help
//objSheet.Quit ();
p_excel-objSheet.ReleaseDispatch(); // doesn't help
p_excel-objSheet = NULL; // doesn't help
//objSheets.Quit ();
p_excel-objSheets.ReleaseDispatch(); // doesn't help
p_excel-objSheets = NULL; // doesn't help
//objBook.Quit ();
p_excel-objBook.ReleaseDispatch(); // doesn't help
p_excel-objBook = NULL; // doesn't help
//objBooks.Quit ();
p_excel-objBooks.ReleaseDispatch(); // doesn't help
p_excel-objBooks = NULL; // doesn't help
p_excel-objApp.Quit ();
p_excel-objApp.ReleaseDispatch(); // doesn't help
//objApp.Release (); // not defined
p_excel-objApp = NULL; // doesn't help


================================================== =
Zachary Hilbun
Software Consultant http://www.vianova.com
Via Nova OpenGL, Open Inventor 3D products, Windows 95/NT
Dallas, Texas VC++, C#, embedded systems, VxD's
1977 SSII SRX31185




All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com