Excel.application shutdown problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Michael Hoffmann (m.hoffmann)
Date: 04/12/04


Date: Mon, 12 Apr 2004 16:18:31 +0200

Hello,

When I do this:

app := CoCreateInstance(.... "excel.application"...)
workBooks := app:workBooks
workBooks:Release()
app:Release()

an Excel process is started and stopped. Perfect.

But when I open a workbook and release the reference
to it like this:

app := CoCreateInstance(.... "excel.application"...)
workBooks := app:workBooks
workBook := workBooks:Open( filename )
workBook:Release()
workBooks:Release()
app:Release()

the Excel process is not stopped and the Excel application
and workbook remain in the ROT. Why? Shouldn't they
be destroyed when the reference count goes to 0?

Thanks

Michael



Relevant Pages

  • Re: Map of used names?
    ... is it possible - and if, how - to get a kind a map i.e. reference, ... where defined names are used in a workbook? ... Michael ...
    (microsoft.public.excel.worksheet.functions)
  • Re: ASP.NET: Cant Kill EXCEL.exe with Office PIA
    ... Besides thorough COM cleanup I still sometimes get stuck excel process so I ... Dim wkBook As Workbook ... dim tmp as WorkBooks ... Dim xlApp As New Microsoft.Office.Interop.Excel.Application ...
    (microsoft.public.dotnet.framework.aspnet)
  • Excel 2003 will not terminate with application.quit
    ... Each time the script is executed, ... Excel process is started, using about 10MB memory. ... You can open any workbook file. ...
    (microsoft.public.excel.programming)
  • Open a workbook as another Excel process
    ... Is there way to made a workbook always open in a seperate Excel ... process if another Excel process is running already via VBA? ...
    (microsoft.public.excel.programming)
  • RE: List Box Columns
    ... but that's easy to control from the third VLOOKUP ... You can stop there and it'll work, but for future reference I'll warn you ... I can get the student and the first test ... Dim wkbk As Workbook ...
    (microsoft.public.excel.programming)