csho
asked on
Looping
This is a second part to a previously solved problem:
https://www.experts-exchange.com/questions/21391917/Looping-Shell-Urgent.html
I now need to use the corrected syntax in a loop from 000001 to 10673 with the number format having 6 digits.
Anyone?
https://www.experts-exchange.com/questions/21391917/Looping-Shell-Urgent.html
I now need to use the corrected syntax in a loop from 000001 to 10673 with the number format having 6 digits.
Anyone?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Again, thank you.
Your welcome. Thanks for the points.
Private Declare Function GetExitCodeProcess Lib "Kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400
Private Function ShellWait(PathName, Optional WindowStyle As VbAppWinStyle = vbNormalFocus) As Double
Dim hProcess As Long, RetVal As Long
hProcess = OpenProcess(PROCESS_QUERY_
Do
GetExitCodeProcess hProcess, RetVal
DoEvents: Sleep 100
Loop While RetVal = STILL_ACTIVE
End Function
Private Sub Command1_Click()
Dim x As Long
For x = 1 To 10673
ShellWait Chr$(34) & "C:\Program Files\IrfanView\i_view32.e
Next x
End Sub