LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default STILL_ACTIVE

Hi! I have a macro that opens another program. It then is supposed to loop
while that other program is still active. This usually works fine but now
there seems to be a problem. I think the other program is working on
something else to begin with. I would really appreciate some help with what
this STILL_ACTIVE means. I get STILL_ACTIVE = 259. What does that mean?

Dim hProc As Long
Dim lExitCode As Long
Dim ACCESS_TYPE
Dim STILL_ACTIVE
Dim lTaskID As Long

ACCESS_TYPE = &H400
STILL_ACTIVE = &H103

'start the bat file
lTaskID = RunBatFile
'get the process handle

MsgBox "stop"

hProc = OpenProcess(ACCESS_TYPE, False, lTaskID)
If Err < 0 Then
Exit Sub
End If
'Wait for the batch program to finish
Do
GetExitCodeProcess hProc, lExitCode
DoEvents
Loop While lExitCode = STILL_ACTIVE

Any help much appreciated!
 
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



All times are GMT +1. The time now is 09:02 AM.

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

About Us

"It's about Microsoft Excel"