Edward Zuris
edzedz at comcast.net
Fri Nov 13 13:58:10 CST 2009
Using the below code from an Access 2000 VBA application, once running these commands there is still an Excel job running in task manager. The Excel orphan makes it impossible to run the VBA application recessively. One clue is Excel will finally shut down if the Access 2000 VBA application / database is shutdown. Any way to tell Excel to just shut down ? Is there a work-a-round for this problem ? Thanks. Sincerely, Edward Zuris. - ======================================================= ====== .Quit code not closing Excel Application ====== Dim ExcelApp As Excel.Application Dim ExcelwBook As Excel.Workbook . . . Set ExcelApp = New Excel.Application Set ExcelwBook = ExcelApp.Workbooks.Add . . . ExcelApp.DisplayAlerts = False ExcelwBook.SaveAs zPath & zName ExcelApp.DisplayAlerts = True ExcelwBook.Save ExcelwBook.Close False ExcelApp.Quit Set ExcelwBook = Nothing Set ExcelApp = Nothing ======================================================= ======================================================= - Yet a simpler VBA applications doesn't have this issue using the following. This also fails using the complex VBA program. Any ideas ? ======================================================= = .Quit code Working closing simple Excel Application = ExcelwBook.Application.DisplayAlerts = False ExcelwBook.SaveAs zPath & zName ExcelwBook.Application.DisplayAlerts = True ExcelwBook.Application.Quit ExcelApp.Quit Set ExcelwBook = Nothing Set ExcelApp = Nothing ======================================================= =======================================================