Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel application.quit in macro problem TimkenSteve New Users to Excel 3 August 17th 06 06:36 PM
Excel 2003 will not terminate with application.quit Peter Schellenbach Excel Programming 11 March 18th 05 08:45 PM
Excel application does not quit Gena Excel Programming 0 October 29th 04 06:17 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Excel 2003 and Application.Quit Dean[_6_] Excel Programming 6 June 22nd 04 06:05 PM


All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"