Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXE in VB

Status
Not open for further replies.

andrew299

Technical User
Nov 18, 2002
140
GB
I have a exe file and a very large macro, is it possible to add a line in the macro that will run the EXE and then continue to run itself. It would save a lot of time and effort.
Thanks in advance
andrew299
 
The question is what do you mean by "and then"? You want the exe to run and finish, with the macro waiting until the exe has completed? Or do you want them to run simultaneously?
Rob
[flowerface]
 
What I want is for the exe to run and finish, with the macro waiting until the exe has finished.
Thanks
 
Unfortunately, that's the more difficult scenario (the default for processes launched with the "shell" command is the opposite). I don't know the best way to accomplish what you're going for. I've seen code before that checks whether the process' task id (returned by the shell function) is still running, but I've not done it myself. I think someone here will be able to help you in more detail.
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top