Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel.Application.Quit()
Hi,
The Excel.Application.Quit() method quits the Excel framework but it does not kill the EXCEL.EXE process. How to kill the process? Thanks, Mircea |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel.Application.Quit()
The reason the Quit method does not terminate EXCEL is usually because
children of the application object still exist. Examine your code & set such objects to NOTHING before calling the Quit method. BUT: if you must kill Excel arbitrarily, try: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SendMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Sub KillXL() XL = FindWindow("XLMAIN", vbNullString) If XL < 0 Then SendMessage XL, 16, 0, 0 End Sub "Mircea Pleteriu" wrote: Hi, The Excel.Application.Quit() method quits the Excel framework but it does not kill the EXCEL.EXE process. How to kill the process? Thanks, Mircea |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel application.quit in macro problem | New Users to Excel | |||
Excel 2003 will not terminate with application.quit | Excel Programming | |||
Excel application does not quit | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
Excel 2003 and Application.Quit | Excel Programming |