0

Is it possible to run a windows command prompt terminal command in VBA but also tell VBA to wait until this command is finished before continuing on in the procedure? If so, how?

Community
  • 1
  • 1
yoshiserry
  • 20,175
  • 35
  • 77
  • 104
  • Hi yes I've seen this only it doesn't discuss how to deal with continued execution of VBA code after a windows cmd command of unknown time has finished – yoshiserry Sep 26 '17 at 05:52
  • I managed to solve this by piping the terminal command to a file and having VBA use a do while loop which repeatedly waited while file not found – yoshiserry Sep 26 '17 at 05:56
  • The top answer at https://stackoverflow.com/questions/15951837/wait-for-shell-command-to-complete (using WScript.Shell) works well. – VirtualMichael Sep 26 '17 at 06:01

1 Answers1

0

I managed to solve this by piping the terminal command to a file and having VBA use a do while loop which repeatedly waited while file not found

yoshiserry
  • 20,175
  • 35
  • 77
  • 104