title: Call shell command in Excel 2010 VBA
body: <p>When I call a shell command in <code>vba</code>, the program opens as does the command prompt but nothing happens and no results are obtained.  I can not seem to figure it out and need some help please.</p>
  
  <p><strong>Command that works</strong></p>
  
  <pre><code>C:\Program Files\BioDiscovery\ImaGene 9.0&gt;ImaGene.exe -batch "C:\Users\cmccabe\Desktop\EmArray\Design\test_11_19_2015.bch"
  </code></pre>
  
  <p>My attempt in excel 2010 using VBA (which opens the program and command prompt, but does not execute the command).</p>
  
  <pre><code>Dim Par As String
  
  Par = "dir c:\Program Files\BioDiscovery\ImaGene 9.0\ImaGene.exe -batch "C:\Users\cmccabe\Desktop\EmArray\Design\imagene.bch"
  Call Shell("C:\WINDOWS\system32\cmd.exe /c " &amp; Par, 1)
  MsgBox ("ImaGene analysis complete")
  </code></pre>