Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Excel.application processus not killed

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
Hi,

despite closing the workbook I opened, quitting the Excel.application object and using set .. = Nothing, the Excel processus is not killed. So each time the code is called, a new instance of Excel is created and stack abobe the previous ones.

Any idea ?

Set objXL = createObject("Excel.Application")
...
objXL.Worksheets("Fr1").Activate
set oSheet = objXL.activeworkbook.activesheet
....
objXL.Worksheets("Fr2").Activate
set oSheet2 = objXL.activeworkbook.activesheet
....
set oSheet = Nothing
set oSheet2 = Nothing
objXL.activeworkbook.close
objXL.quit
set objXl = Nothing


Thanks
 
Hello, delorfra.

Since the script is very much fragmentary, cannot figure out exactly what was going on there. Although I have some serious reserve of quite a few of your constructions, such as objXL.Worksheets("xxx") there, but, if I concentrate on the sole phenonmenon you raised, I would suspect that the workbook is not closed out correctly at all.

Hence to test out the theory, suppress the DisplayAlerts before the activeworkbook.close, namely,

...
objXL.DisplayAlerts=False 'adding this line
objXL.activeworkbook.close
objXL.quit

See if you can kill off the process.

If you can, it proves the theory.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top