title: Excel VBA Wait For Shell to Finish before continuing with script
body: <p>Right now I have this VBA script:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub executeFTPBatch(ftpfileName)
       Call Shell("FTP -i -s:C:\Temp\" &amp; ftpfileName &amp; ".txt")
       On Error Resume Next
       Kill (C:\temp\" &amp; ftpfileName &amp; ".txt")
  End Sub
  </code></pre>
  
  <p>The problem is that it kills the text file before the FTP script has even begun.  I saw some wsh codes, but I wasn't sure of the syntax on how to use it with respect to calling the shell FTP.  If you can help me with the correct syntax I would really appreciate it!</p>