Problem with quitting Excel opened through automation

  • Thread starter Thread starter Michelle
  • Start date Start date
M

Michelle

Hi All

I open an instance of excel from access

dim xlapp = excel.application

set xlapp = new excel.application

I do all the stuff i need to do then

xlapp.quit
set xlapp = nothing

Excel appears to close but the process is still running in
the task manager. When i close access the process
disappears. I am running office 97

I have searched the net for a solution to this and all the
answers i find suggest that using the quit method should
work. However, it doesn't.

does anybody have a real solution to this problem.

thanks
michelle
 
Hi Michelle,
I open an instance of excel from access

dim xlapp = excel.application

set xlapp = new excel.application

I do all the stuff i need to do then

xlapp.quit
set xlapp = nothing

Excel appears to close but the process is still running in
the task manager. When i close access the process
disappears. I am running office 97

I have searched the net for a solution to this and all the
answers i find suggest that using the quit method should
work. However, it doesn't.

does anybody have a real solution to this problem.

Two things:

1. In the "I do all the stuff i need to do then", you may be using
unreferenced calls into the Excel object model (a common one being the
Cells() method), which will get you a brand new instance to play with.

2. If you've left anything open in Excel, the application.Quit may be
waiting for a 'Save changes' prompt.


Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk
 
Have tested with

sub test()

do all the stuff i need to do then

Application quit

end su
 
Back
Top