View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zachary Hilbun Zachary Hilbun is offline
external usenet poster
 
Posts: 1
Default 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