can't close Excel ! --- workaround found but now doesn't work any more !!!!
I have a funky problem w/ Excel. I open an existing XLS file, activate a sheet, work create some charts on the sheet, then close the app, BUT it doesn't close. Here's the code:
VB Code:
' in a public module, I have:
Public xlApp As excel.Application
' everything here down is in same module
' "open" code
' prior to executing these statements, task mgr shows no Excel
Set xlApp = New excel.Application
xlApp.Workbooks.Open xlsfilename
' excel instance now shown by task mgr
' work with excel app here
' "close" code
xlApp.DisplayAlerts = False
xlApp.ActiveWorkbook.Close SaveChanges:=True, filename:=xlsfilename
xlApp.Quit
Set xlApp = Nothing
' at this point, task manager shows an open instance of Excel
' but WHY ???
I have created some chart objects while working in the sheet, but I set them back to nothing (Set chart1 = Nothing) before leaving the function that manipulates them.
I can't see why Excel stays open. Once I close my VB app, the hidden instance of Excel goes away, but it SHOULD go away when I close it and quit it and set it to nothing, right ?
What else can I do to get rid of it (short of manual intervention via the task manager, which isn't an option for my computer-illiterate users).
Thanks for any help