Excel won't quit after the user closes it.

M

Margaret Bartley

I'm working with a mixed environment, Office 10 and Office 11 (Office XP and
Office 2003). I'm working with Access 2003.

I'm exporting a query from Access to Excel using late binding - no
references to the Excel libraries in any module.

After exporting queries results from Access, the user reviews the new Excel
worksheet, and prints it out, and then manually closes Excel. The problem is
that Excel keeps running, hidden, in the background.

My code will either open a new workbook, if the user already has Excel open,
or
will open Excel it it's not open. It doens't matter. Either way, when the
user closes Excel, it stays running. You can only see it in Task Manager.

I suspect it has to do with the fact that the Access form that generates the
Excel worksheet has not closed the Excel application in code and has not
closed the application instance. Nor should it - the users want to switch
control to Excel at that point, and continue working in Excel.

I'm not quite sure what's going on here, and how to allow the users to
manually shut down Excel when it's been opened from code in Access.
 
M

Mehul

Can someone please let us know how to kill the Excel process when the Excel
window is closed?...perhaps there is an event to detect if Excel is shutting
down? I haven't been able to find such an event.
 

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