Monday, 23 July 2012

VB.NET - How to kill running Excel Processes

        Dim pListOfProcesses() As Process
        Dim pExcelProcess As System.Diagnostics.Process
        pListOfProcesses = pExcelProcess.GetProcesses
        For Each pExcelProcess In pListOfProcesses
            If pExcelProcess.ProcessName.ToUpper = "EXCEL" Then
                pExcelProcess.Kill()
            End If
        Next

 More Info:

No comments:

Post a Comment