title: Starting VBScript from Access VBA
body: <p>I'm trying to call a VBScript to launch in 32-bit from with-in an Access VBA function.  I have tried several different variations of Shell, but nothing seems to work, here is my most recent try:</p>
  
  <pre><code>Function callVS()
      Dim wsh As Object
      Set wsh = CreateObject("Wscript.Shell")
      Dim errorCode As Integer
      errorCode = wsh.Run("C:\Windows\syswow64\cscript.exe '\\hct431vntgta901\test scripts\machine queries\queryTest.vbs'", 1, True)
      If errorCode &lt;&gt; 0 Then
          MsgBox "Error was recieved"
      End If
  End Function
  </code></pre>
  
  <p>The script receives an error every time I try to run it, I cannot see what the error is, it just fails to run the script.  </p>
  
  <p>I have tried and if I run the following command in CMD it runs the script just fine:</p>
  
  <pre><code>C:\Windows\syswow64\cscript.exe "\\hct431vntgta901\test scripts\machine queries\queryTest.vbs"
  </code></pre>