Do you mean an Excel file, or an instance of Excel?
If the latter, then you should create the Excel instance in your code, tell
Excel to open the file, do your processing, close the file, destroy the
instance of Excel.
Set a reference to Excel in your app, then it would go something like this
Dim oXL as Excel.Application
Dim wInput as Workbook
set oXL = CreateObject("Excel.Application")
set wInput = oXL.Workbooks.Open ("your file name")
'do your processing
wInput.Close False
'close the app
oXL.Quit
'make sure it's gone
Set oXL = Nothing
Robin Hammond
www.enhanceddatasystems.com
"urgent" wrote in message
...
i have an application which first checks if there is an excel file in
certain
location, and then call DTS package to run. but my problem is everytime
when
the application runs through, i have one excel file open and i couldn't
delete or remove...after running a few times, they take up all resource
and
then got error: Subscribe out of range..
i tried to close workbooks, but only the application workbook found, other
files' workbooks can't be located! anybody has any clues? can i use
process
to kill? but if so, no process such object in exce.