Private Function closeExcel() As Short
Dim count As Short = 0
Dim excelInstance As System.Diagnostics.Process
Dim excelInstances() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("Excel")
For Each excelInstance In excelInstances
Try
excelInstance.Close() '<-- you can use close or kill .. up to you
excelInstance.Kill()
count += 1
Catch ex As Exception
End Try
Next
Return count '<--- this is gonna tell you the # of excel instances closes
End Function