Excel.exe cannot be quit

K

kei

the following code is in Delphi 7 syntax

var ExcelApp: variant;
begin
try
ExcelApp := CreateOLEObject('Excel.Application');
except
MessageDLG('Unable to start Excel',mtError,[mbOK],0);
Raise;
end;
if not VarIsEmpty(ExcelApp) then
//if (ExcelApp <> Unassigned) then // will have
//runtime error
begin
ExcelApp.Quit;
ExcelApp:= unassigned;
end;
end;

after running excelApp.quit, I find the excel.exe still run
(check by using windows task manager, processes tab), why will this happen?
I think this may related to excel version because
my colleague using excel 2003 has no this problem!

My Excel version is "excel 2002 (10.2614.2625)
My Delphi version is 7
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top