Hey all, I'm having some issues with parsing data. One of my coworkers sent me a macro (with one module), when I ran that macro in the workbook he sent all worked well and no errors. But when I copied and pasted the module into my workbook it breaks in the "set parse = .parsejson" I'm unsure how each function works fine for his, but once I run it it breaks. I also made sure to include the same references as his to try and avoid any issues. But I've had zero luck. Help is appreciated, ty.
VBA Code:
Dim wrksht As Worksheet
Set wrksht = test: wrksht.Cells.Clear
Dim header As Object, c&, r&
Set header = CreateObject("Scripting.Dictionary")
Dim hkey As Variant: Set http = parse(http.responseText).returnedObject.records
Public Function parse(json As String) As Object
'-------------------------------------
With CreateObject("HTMLFile")
With .parentWindow
.execScript "var ParseJSON = " & json, "JScript": Set parse = _
.ParseJson
End With
End With
End Function