Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I am opening an existing Excl sheet in a AxWebBrowser (that's the easiest way i got) on a window form created by VB.net 2005.

My issue is that i am not able to : close the file so when i try to open another file or over write the same file (on HDD) i am not able to do it.

Also i find the excel exe (in the task manager) running in the back which is not freeing the excel.

What can be done to solve these issues?

Regards
Nishkarsh
Posted

1 solution

try this
just kill the excel process from the task manager, from your application.

use this below code.



Public Sub Kill_Application(ByVal ApplicationName As String)
Try
Try
Dim processList1() As Process
processList1 = Process.GetProcessesByName(ApplicationName)
For Each proc As Process In processList1
proc.Kill()
Next
Catch
End Try
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900