Detecting completion of a shelled DOS program

  • Thread starter Edward Thrashcort
  • Start date
E

Edward Thrashcort

I want to shell a DOS-based program in a "command" window
.... not a problem to implement.

HOWEVER.....
How can I detect when the DOS program has terminated (the window has closed)

I tried

While DoEvents: Wend

not really knowing what this does ...
but it doesn't seem to work

Eddie
 
J

Jonathan West

Edward Thrashcort said:
I want to shell a DOS-based program in a "command" window
... not a problem to implement.

HOWEVER.....
How can I detect when the DOS program has terminated (the window has
closed)

I tried

While DoEvents: Wend

not really knowing what this does ...
but it doesn't seem to work

Eddie

Hi Eddie

http://vb.mvps.org/samples/project.asp?id=Shell32

The code samples there include a Shell-and-wait routine which does all you
need.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top