Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I do certain excel reports via QlikView macros. They create the reports and then quit excel.
But I still have instances of EXCEL.EXE*32 showing up in my task manager's processes.
These reports run automatically every morning, so every few days I find myself opening TM and ending up to 5 or 10 instances of excel, even though the application isn't actually "open".
Any ideas?
My macros end with:
XLDoc.SaveAs NewFileName
XLApp.Quit
End Sub
Hi,
Not really QlikView related so I went searching for excel/vbscript questions on google and found these two posts that might help you:
This one seems to be due to the fact that the workbook is not closed before killing the excel application
This one has some general advice on cleaning up before killing excel that might help. There's also a workaround in the form of a piece of vbscript that will kill any Excel processes when ran
http://social.msdn.microsoft.com/Forums/en-US/exceldev/thread/93958cdb-1a4d-490b-9e47-5be25e430a21/
Hi Johannes,
I've now tried different variations of closing the file and doing s cleanup after, and still no luck. Same result.
XLDoc.SaveAs NewFileName
XLDoc.Close 'test
XLApp.Quit
SET XLApp = nothing 'test
SET XLDoc = nothing 'test
End Sub
Okay I found my (stupid) problem.
I had two different places in the code where I was repeating this:
SET XLApp = CreateObject("Excel.Application")
And then I was just quitting one instance of excel. Deleting the duplicate line sorted this out.
Thanks for the help.
G
This is not working for me.
strFile = "F:\B-FS102\GSM\Facturen\Facturatie\" & strValueToDisplay & "_" & strvID &".xlsx"
' Save and quit
objExcelWorkbook.SaveAs strFile
objExcelWorkbook.Close
objExcelApp.close
objExcelApp.quit
SET objExcelWorkbook = NOTHING
SET objExcelApp = NOTHING
Leaves excel open.
The file close but excel remains open.
Help anyone.