How to wait for a shell process to finish before executing further code in VB6
I have a small VB6 app in which I use the Shell command to execute a program. I am storing the output of the program in a file. I am then reading this file and putting the output on the screen using a msgbox in VB6. This is what my code looks like now: sCommand = "\evaluate.exe<test.txt " Shell ("cmd.exe /c" & App.Path & sCommand) MsgBox Text2String(App.Path & "\experiments\" & genname & "\freq") The problem is that the output which the VB program is printing using the msgbox is the old state of the file. Is there some way to hold the execution of the VB code until my shell command program