0

Ok, I'm Stumped. I built a dB that pulls data from Yahoo Finance API to compile a report. Built in Access 2010 and housed on out network. Everything was working like gravy. Well now, I have a dedicated computer, that this is going to run from. After setting it up, I am getting Runtime 5 with the "Shell" line highlighted in the code below:

Public Function RunYahooAPI()

Dim chromePath As String

  chromePath = """C:\Program Files\Google\Chrome\Application\chrome.exe"""

 Shell (chromePath & " -url http://download.finance.yahoo.com/d/quotes.csv?s=CVX%2CXOM%2CHP%2CSLB%2CPBA%2CATR%2CECL%2CNVZMY&f=nsl1op&e=.csv")

End Function

Things I have checked so far from searching online:

  1. Ran it as a Sub vs Function. No change
  2. Disabled my Anti-virus software. No change
  3. Checked references. All match the 2010
  4. Took out the spaces in the Shell. No change
  5. Added """ around the url. No change
  6. Also logged directly on the computer to try vs RC. No change

I really am at my wits end on this. Hoping a second set of eyes can set me straight.

I should probably also mention I am running this all through a remote connection.

Erik A
  • 31,639
  • 12
  • 42
  • 67
SanLuka
  • 125
  • 2
  • 13
  • I may recommend to kick off `chrome` and use something light-weight like [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) if you cannot include the download completely in [your code](http://stackoverflow.com/questions/15644254/connect-to-web-service-in-ms-access-with-vba). – PeterMmm Dec 23 '15 at 19:32
  • Your code tries to write to the Program Files directory, which is not allowed when UAC is enabled. Error 5 is *Access denied*. Presumably, you've not got UAC enabled on your own machine (shame on you) but it's enabled on the new machine. – Ken White Dec 23 '15 at 19:43
  • Ken, so are you saying if I moved the chrome executable to the desktop, or even the network, that it would fix it? – SanLuka Dec 23 '15 at 19:49
  • I just remapped it to the desktop. No dice. And UAC is disabled on both machines. – SanLuka Dec 23 '15 at 19:52
  • Peter, I had attempted that previously. As I recall I switched to this method because of something that wasn't working before. – SanLuka Dec 23 '15 at 20:02
  • Would the fact that the new computer is running 64-bit OS whereas the old one is 32-bit? – SanLuka Dec 23 '15 at 20:38
  • You *have* checked `chromePath`, have you? 32-bit Chrome would be in "C:\Program Files (x86)\" . – Andre Dec 24 '15 at 10:07
  • The parentheses around the Shell argument are syntactically wrong, even if it works when there is only one argument. The correct syntax is `Shell "cmdline"` or `result = Shell("cmdline")`. – Andre Dec 24 '15 at 10:10
  • Thanks Andre, even when it's a URL path? I guess I'm confused regarding that. I've seen the `result = Shell("cmdline")` before, but only on file paths, not URL's. The above script was the only URL based one I could find. – SanLuka Dec 24 '15 at 13:45
  • And, yes I actually put chrome at the location in the path. – SanLuka Dec 24 '15 at 13:51

1 Answers1

0

After more searching, the 64-bit doesn't play well with the 32-bit. Switched over to a 32-bit OS and Office, and everything is working fine. Apparently having that miss-match causes a lot of random issues.

SanLuka
  • 125
  • 2
  • 13