title: Error running RScript in Excel VBA
body: <p>I've searched through several solutions to this same problem, but my code still doesn't work. Made sure to not have spaces in my file path, and still have it triple quoted to be sure. I get the "Method 'Run' of object 'IWshShell3' failed" error from running the macro. What could I be missing here?</p>
  
  <p>Code:</p>
  
  <pre><code>Sub RunRscript()
      Dim shell As Object
      Set shell = VBA.CreateObject("WScript.Shell")
      Dim waitTillComplete As Boolean: waitTillComplete = True
      Dim style As Integer: style = 1
      Dim errorCode As Integer
      Dim path As String
      path = "RScript ""G:\structureshouston\Kocian\hello.R"""
      errorCode = shell.Run(path, style, waitTillComplete)
  End Sub
  </code></pre>