Hi. I don't know if this is a VB2005 or MS Excel issue so I will start with VB2005.
This is how I open an Excel file in VB2005:
Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objSheet As Excel.Worksheet
objExcel.Visible = True
objWorkbook = objExcel.Workbooks.Open("C:\Users\dvu\Documents\Data.xlsx")
objSheet = objWorkbook.Worksheets(1)
and this is how I close it:
Dim objExcel As New Excel.Application
objExcel.Application.Quit()
The problem is MS Excel always open a Book1.xlsx in addition to my Data.xlsx. As such closing Data.xlsx only closes Data.xlsx but not Book1.xlsx.
Over time, as I continue to develope and debug my program, Task Manager would collect "countless" Book1.xlsx. Wth EXCEL.EXE still opened, I noticed that my VB2005 doesn't work "completely" right.
If this is a VB2005 issue then how do I "completely" close everything that is Excel? If this is a Windows issue, and if you could offer a solution as well, I would truly appreciate any assistance. Thank you.
This is how I open an Excel file in VB2005:
Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objSheet As Excel.Worksheet
objExcel.Visible = True
objWorkbook = objExcel.Workbooks.Open("C:\Users\dvu\Documents\Data.xlsx")
objSheet = objWorkbook.Worksheets(1)
and this is how I close it:
Dim objExcel As New Excel.Application
objExcel.Application.Quit()
The problem is MS Excel always open a Book1.xlsx in addition to my Data.xlsx. As such closing Data.xlsx only closes Data.xlsx but not Book1.xlsx.
Over time, as I continue to develope and debug my program, Task Manager would collect "countless" Book1.xlsx. Wth EXCEL.EXE still opened, I noticed that my VB2005 doesn't work "completely" right.
If this is a VB2005 issue then how do I "completely" close everything that is Excel? If this is a Windows issue, and if you could offer a solution as well, I would truly appreciate any assistance. Thank you.