Possible Duplicate:
How to wait for a shell process to finish before executing further code in VB6
I'd like to write program that will generate text file, process it with another one and then load results.
As I'm experimenting the code is slightly different:
Main.Command2.Enabled = False
Shell "foobar.exe =bar.txt +" & "foo.txt", vbMinimizedNoFocus
Main.Command2.Enabled = True
Kill "bar.txt"
and the bar.txt
file still remains in the directory and foobar
's testing routine doesn't throw error that bar.txt
exists.
How can I force my program to wait until foobar.exe
finishes?
Resolved at How to wait for a shell process to finish before executing further code in vb6