View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Closing Excel from Access

You probably have created a reference to excel that has not been released -
or can not be released.

Carefully look at all your statements in the code and make sure they are
fully qualified from the xlapp down to the object your are referencing
including any references that might be contained in arguments.

xlApp.ActiveCell.currentRegion.Sort Key1:=ActiveCell

as an example causes a problem because the second use of ActiveCell is not
fully qualified.

--
Regards,
Tom Ogilvy

"Good Try" wrote in message
...
Please help.

I have an application in MS Access that reads data from Excel workbooks

into
an Access table using the Access TransferSpreadsheet method. All of the
workbooks were created by MS Access and assigned a password when they were
created. These passwords are stored in a table in the Access database.

In
order to use the TransferSpreadsheet method without prompting the user for
the password, I create an instance of MS Excel and then open the workbook
using the stored password.

All this works fine except that I cannot terminate MS Excel. I have tried
calling the Application.Quit method and setting my local variable to
nothing, but the instance of Excel continues to run in the Task List.

Any thoughts?
--
Kerry Carroll