excel 2003 Resides in Task manager.

P

Pandi

(On WinXP Pro SP2 / Access 2003 / Excel 2003)
The following code, when run from Access, leaves a copy of Excel.exe
hanging
around in memory.

'***********************************************
Sub testXL()


Dim objXL As Object
Dim wkbXL As Object
Dim strFileName As String


On Error GoTo errHandler
strFileName = "C:\Test.xls"
Set objXL = CreateObject("Excel.Application")
Set wkbXL = objXL.Workbooks.Open(strFileName)


exitHere:
On Error Resume Next
wkbXL.saved = True
wkbXL.Close


' also tried this
' wkbXL.Close savechanges:=False


Set wkbXL = Nothing
objXL.Quit
Set objXL = Nothing
On Error GoTo 0
Exit Sub


errHandler:
MsgBox (Err.Description)
Resume exitHere


End Sub
'***********************************************


Code works fine against Excel 2002 and 2000. Is this a known issue with

Excel 2003? I've tried many variants including explicitly referencing
Excel
library, early binding, explicit Save of workbook. None of them have
worked.
I tried setting Application.Visible=True to see if there was any dialog
open
that was waiting for input but nothing showed up.

I could not able to find the solution for this problem.
I have tried to find the solution from different search and blogs.

Can anybody help me please.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top