View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stephen Bullen[_3_] Stephen Bullen[_3_] is offline
external usenet poster
 
Posts: 74
Default Problem with quitting Excel opened through automation

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