Waiting for a task to end
Posted on 2000-04-20
Here we go again!
Here is my code:
Rem to copy from source y times
Dim x As Integer
Dim y As Integer
y = Text1.Text
For x = 1 To y
.wFunc = lFileOp
.pFrom = txtSource.Text & vbNullChar & vbNullChar
.pTo = txtDestination & vbNullChar & vbNullChar
.fFlags = lFlags
lresult = SHFileOperation(SHFileOp)
If cWindiff = 1 Then
'Will launch WINDIFF
Dim wd As Long
Dim strCommand As String
strCommand = "a:\windiff -Sdx a:\d.txt " & txtSource.Text & " " & txtDestination.Text & " "
wd = Shell(strCommand, vbNormalFocus)
After Windiff launches the loop continues to iterate a new copy process (it begins a new loop) before the Windiff app has time to finish. how do I stop the FOR NEXT long enough to allow Windiff to finish executing?