View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Simon Murphy Simon Murphy is offline
external usenet poster
 
Posts: 30
Default Excel instances remain opened

Gérard
You are not quitting Excel
Try
xlapp.workbooks.close
xlapp.quit
set xlapp = nothing

note workbooks.close is going to throw up a msgbox to save changes
better to use
xlapp.worksbooks(1).close savechanges:=true (or false)
cheers
Simon

"Gérard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of Win
2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

Gérard Ducouret