View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Atchoum Atchoum is offline
external usenet poster
 
Posts: 4
Default Excel won't quit from VB.NET

I've read zillions of threads on this and can't figure out why Excel process
is still running. Can someone help?

Private ExcelApp As Excel.Application
Private oBooks As Excel.Workbook

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
CreateObject("Excel.Application")
Wb = ExcelApp.Workbooks.Open("C:\Book1.xls")

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

ExcelApp.Workbooks.Close() '(or Wb.Close)
ExcelApp.Quit

End Sub

I don't get why even after ExcelApp.Quit, Excel.exe still appears in task
manager...

Atchoum