Excel process remains running
After creating an Excel object in VBA, manipulating and
destroying the object, a process remains running in the background. Dim exApp As Excel.Application Dim exBook As Excel.Workbook Dim exSheet As Excel.Worksheet Set exApp = CreateObject("excel.Application") Set exBook = exApp.Workbooks.Open(Path...) Set exSheet = exBook.Sheets(1) ....(some process) exApp.Quit Set exSheet = Nothing Set exBook = Nothing Set exApp = Nothing Checking with Task Manager verifies that the application was removed however in the processes tab a process of Excel is not destroyed and keeps on running. Am I doing anything wrong? Thanks Josh |
Excel process remains running
Weird problem, Josh. A very general first answer is to set Excel visible and
see what she does, is she asking for something when you kill her ? Set exApp = CreateObject("excel.Application") exApp.Visible = True Dim exBook As Excel.Workbook 'and as is from there -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please "Josh" skrev i melding ... After creating an Excel object in VBA, manipulating and destroying the object, a process remains running in the background. Dim exApp As Excel.Application Dim exBook As Excel.Workbook Dim exSheet As Excel.Worksheet Set exApp = CreateObject("excel.Application") Set exBook = exApp.Workbooks.Open(Path...) Set exSheet = exBook.Sheets(1) ....(some process) exApp.Quit Set exSheet = Nothing Set exBook = Nothing Set exApp = Nothing Checking with Task Manager verifies that the application was removed however in the processes tab a process of Excel is not destroyed and keeps on running. Am I doing anything wrong? Thanks Josh |
Excel process remains running
Thanks for the reply.
I tried it both ways, visible and not visible. Both result the same. Forgot to mention though that it occurrs in WIN2K and XP. I did not try any previous OS. Thanks anyways. -----Original Message----- Weird problem, Josh. A very general first answer is to set Excel visible and see what she does, is she asking for something when you kill her ? Set exApp = CreateObject("excel.Application") exApp.Visible = True Dim exBook As Excel.Workbook 'and as is from there -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please "Josh" skrev i melding ... After creating an Excel object in VBA, manipulating and destroying the object, a process remains running in the background. Dim exApp As Excel.Application Dim exBook As Excel.Workbook Dim exSheet As Excel.Worksheet Set exApp = CreateObject("excel.Application") Set exBook = exApp.Workbooks.Open(Path...) Set exSheet = exBook.Sheets(1) ....(some process) exApp.Quit Set exSheet = Nothing Set exBook = Nothing Set exApp = Nothing Checking with Task Manager verifies that the application was removed however in the processes tab a process of Excel is not destroyed and keeps on running. Am I doing anything wrong? Thanks Josh . |
All times are GMT +1. The time now is 08:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com