ParseJson error, "Object doesn't support this property or method"

jj78577

New Member
Joined
May 7, 2022
Messages
1
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
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
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,215,565
Messages
6,125,583
Members
449,237
Latest member
Chase S

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top