Excel object not released

flynn
03-25-2003, 08:48 AM
Is there any program that can detect how many references an object (in this case, excel) has?

I have a VB app that opens Excel, opens hundreds of workbooks (1 at a time) then exits. The Excel object that I create does not get released when the app ends, even though I do this: "set ExcelApp = nothing". I am using the Task Manager to watch as Excel is created, but never released.

tia,

flynn

Syko10-96
03-25-2003, 08:59 AM
Hello!

Are you also calling ExcelApp.Quit as well as closing your Workbook/Workbooks objects?

Mikecrosoft
03-25-2003, 09:15 AM
Also I recommend to use GetObject(,"Excel.Application") before to open a new Excel instance to get the current instance opened, if is there, if not have any excel instance opened then use:
Set ExcelApp = New Excel.Application or Set ExcelApp = CreateObject ("Excel.Application")

I hope help

flynn
03-25-2003, 09:54 AM
That was it Syko. I stared at it, but didn't see it. Thank you.

Syko10-96
03-25-2003, 09:56 AM
no problem! Glad you figured it out :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum