Running external programs

  • Thread starter Thread starter Alan Beban
  • Start date Start date
A

Alan Beban

A friend is asking "How do I run an external .exe or .cmd file from
Excel?" Is that a meaningful question without more?

TIA,
Alan Beban
 
That seems like a reasonable question.

I think I'd respond with:
Add a hyperlink that points at the .exe and click the hyperlink.
or use the Shell command from VBA (if you can't control it yourself--like word.)

I'd guess that my responses might get more questions, though.
 
VBA's shell command will continue execution immediately after the executable
has launched.
Do a Google Search for: VBA ShellWait to get VBA to wait for the process to
terminate.
 
Googling for ShellAndWait finds a few more than ShellWait. (I didn't compare
the results, though--they could be the same routine.
 
Back
Top