
Unclosed MSExcel instance
I currently have an Excel Spreadsheet managed by a Visual Basic project.
This is working well except for one problem.
Once the execution has finished , the program close itself but an excel
instance remain open.
Now I know everyone is probably saying, "Well you haven't closed your
objects properly". So here is what code I am using to declare the objects:
(I'm using Vb6, MSOffice 2000 Pro, WindowsXp)
Option Explicit
Public FileExcel As Workbook
Private Sub MDIForm_Load()
Set FileExcel = Excel.Workbooks.Open(App.Path & "\Ges.xls")
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
FileExcel.Close (True)
Set FileExcel = Nothing
End
End Sub
Thanks again,
Fabio