title: Shell cmd in access vba returns error 5 - invalid procedure call or argument
body: <p>I have used the Shell command in MS Access for several years in multiple databases in various versions.  Most recently, I have received this Run-Time error 5 - invalid procedure call or argument on a Shell command I have used for many years.  Can anyone tell me if there was a recent Windows update or possibly MS Office update that has caused this error to appear?  I am currently using Office 2010 and Office 2013 and receiving the same error in both version on multiple computers.  I have even tried creating a simple empty database and gone straight to the vba window and in the immediate window tried a simple Shell command as such:   </p>
  
  <pre><code>Shell "C:\Notepad.bat", vbNormalFocus  
  </code></pre>
  
  <p>Notepad.bat is a simple command inside it:  </p>
  
  <pre><code>cmd /C "Notepad.exe"
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>Shell "Notepad.exe", vbNormalFocus 
  </code></pre>
  
  <p>does work, but:</p>
  
  <pre><code>Shell "Cmd.exe", vbNormalFocus 
  </code></pre>
  
  <p>still gives the same Error 5 message on every machine I test it on.   Running the batch files from the Windows explorer works just fine.  Any help is much appreciated.</p>