I am trying to import data from an API and am running into trouble when I try to pull the data. The reason being that I am running Excel 16' on Mac os and ActiveX is not optimized for Mac and thus cannot create the necessary object. Unfortunately, I am not adept enough in VBA to craft my own solution. How can I work around this issue? I am utilizing Tim Hall's synthetic scripting library to use JSon, which works perfectly.
The debug stops at the set myrequest
line below:
'send web request for api data
u = "https://financialmodelingprep.com/api/v3/financials/income-statement/" & ticker & " "
Set myrequest = CreateObject("Winhttp.WinHttopRequest.5.1")
myrequest.Open "Get", u
myrequest.Send
The exact error message I'm receiving is "ActiveX component cannot create object". Thanks in advance for any help!
I have tried using John Stephens/Scott Dudley's solution to this issue (How do I issue an HTTP GET from Excel VBA for Mac) but I am getting a value error in excel when I call the function httpGet
.