objXL.close before you set it to nothing
----- Original Mage ----- From: "jsivanan" <[email protected]> To: [email protected] Sent: Friday, December 4, 2009 7:04:53 PM GMT -05:00 US/Canada Eastern Subject: [Access VBA Central] Opening and Closing Excel from Access I'm using Access to update Excel Workbooks. The code below works to get me through the procedure and closes the application, but an Excel process is left running after the procedure finishes. That is, if you open Task manager, there's no "Excel" in the Applications tab but there's an "Excel" in the Processes tab. Is there something else I have to do to close the remaining process or is there another explanation as to why it remains? Thanks for your help, Jnana Set objXL = CreateObject("Excel.Application") With objXL.Application .Workbooks.Open WorkbookName . . (Changes to workbook) . .ActiveWorkbook.Close SaveChanges:=True .Quit End With Set objXL = Nothing [Non-text portions of this message have been removed]
