Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I have a code that close a process. Could someone check this out for me. Declare Function GetExitCodeProcess Lib "kernel32" _ (ByVal hProcess As Long, _ lpExitCode As Long) As Long Sub ExitPLaunch() Dim TaskID As Long Dim hProc As Long Dim lExitCode As Long Dim ACCESS_TYPE Dim STILL_ACTIVE ACCESS_TYPE = &H400 STILL_ACTIVE = &H103 ' Shell the task TaskID = Shell("C:\program files\PLaunch\PLaunch.EXE, 1) On Error Resume Next ' Get the process handle hProc = OpenProcess(ACCESS_TYPE, False, TaskID) On Error GoTo 0 Application.StatusBar = "Waiting for Packhedge application to finish" Do GetExitCodeProcess hProc, lExitCode DoEvents Loop While lExitCode = STILL_ACTIVE ' Ouffa is Finshed End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Kill Excel Process | Excel Programming | |||
How to Kill Excel application process | Excel Programming | |||
Quit Method do not kill excel process | Excel Programming | |||
Quit Method do not kill excel process | Excel Programming | |||
to kill a excel process | Excel Programming |