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

You are probably creating an unqualified reference to Excel. Since it is
unqualified, it can't be released and excel stays in memory until you hit the
reset button in Access or you might even have to close Access.

always fully qualify all your references

rather than
selection.Value = 3
xlapp.Selection.Value = 3

where xlApp represents the reference you created when you started Excel
through automation.

--
Regards,
Tom Ogilvy

"JR_06062005" wrote:

Access creates a report which is exported to Excel using the
TransferSpreadsheet function. My code then opens the file in Excel workbook,
makes some format changes and then saves and closes the file.

The workbook I created closes, but Excel, with no open workbook, remains
open. I tried to close it with the code Excel.Application.Quite. But this
does not close the application.

How do I close the whole Excel application?