| Forum: ASP.NET |
Thema:
Re: Exit Excel ??? |
Von:
G. Guest (
16.12.2004 14:08) |
Private Sub Excel_Closing(ByVal Wb As Excel.Workbook, ByRef Cancel As Boolean) _
Handles objExcel.WorkbookBeforeClose
Dim procs() As Process = Process.GetProcesses
Dim i As Integer
Cancel = False
For i = 0 To (procs.Length - 1)
If procs(i).ProcessName.ToUpper = "EXCEL" Then
If procs(i).MainWindowHandle.ToInt32 = objExcel.Hwnd Then
procs(i).Kill()
End If
End If
Next
End Sub
gruß daniel
Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!