excel application does not shut down after program exit

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi
i create an excel application (MS Excel 2000 installed) in vb.net. At the end, i close all workbook and quit from excel aplication. I also set them nothing and call garbage collection. But excel application does not end, stays resident in memor
so my applications gives memory error.

Thanks for your help
 
I haven't used VB.Net other than to explore its capabilities. So, I
don't know if this applies in your case.

One cause is a 'global' reference to an XL object. Suppose you have a
reference set to the XL application. Then, you can use a statement
such as Range("A1").Value=1 (i.e., without qualifying it with an object
such as xlApp.). While possible, it results in a reference established
from the controlling app to the controlled app. Consequently, the
controlled app cannot go away as long as the controller is active.

One way to find the problem is to test with late binding. Then,
unqualified references will result in compile errors.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Back
Top