kill excel proccess after use

  • Thread starter Thread starter thread
  • Start date Start date
T

thread

hi all,
does anyone know how can i end or kill excel proccess via vba,i use
set xlapp = nothing
set xlwb = nothing
but it didnt end the process
 
thread said:
hi all,
does anyone know how can i end or kill excel proccess via vba,i use
set xlapp = nothing
set xlwb = nothing
but it didnt end the process

My view is that trying to kill the process after automating Excel, is
treating the symptom, not the cause. I would recommend to rather find
the cause of it, and correct that.

The most common reasons for having an instance of Excel left in memory
after automating, is usage of Excel objects, properties and methods
without fully qualifying them through your Excel object variable(s).

What to look for, is usage of ActiveCell, ActiveWorkbook, ActiveSheet,
Selection, Cells etc, without being qualified through Excel objects.

Check out this article
http://support.microsoft.com/kb/189618/EN-US/
with some info, plus further links. If you still have problems, then
we'll probably need to see the code.

Also, releasing them in the correct order, might be important, say for
sheet, workbook and application, you'd release the sheet first, then
(close and) release the workbook, then (quit and) release the
appliation
object.
 
Back
Top