I know someone out there knows this, because I've seen it myself somewhere...

How can I detect when a program I've shelled with ShellExecute has finished?

I need something that loops, if possible, so that I can keep it within a single form's sub to ease things along. Something along the lines of:

Code:
Do While (StillExecuting)
DoEvents
Loop
So that I can put in the code to execute after it's finished immediately after the loop.

Thanks in advance.