VBA-tools / VBA-JSON

JSON conversion and parsing for VBA
MIT License
1.76k stars 568 forks source link

method or data member not found. Set json_ParseObject.Item(json_Key) #201

Closed sammuelsum closed 3 years ago

sammuelsum commented 3 years ago

This is mentioned in one of the issues, but no solution is posted there. During compilation, the code "Set json_ParseObject.Item(json_Key)" gives an error message "Method or data member not found".

sammuelsum commented 3 years ago

Oh Sorry. Did not add the dictionary class.

stevenlmas commented 2 years ago

I'm having the same problem. Did you add the dictionary class from this repo? Or just add "MS Scripting" in Tools > References. Or did you have to declare/set something as a dictionary?

ericliu0408 commented 1 year ago

I still meet the error on the latest release

Peter59SE commented 11 months ago

Hi Running on Win 10 and using O365 this solved the "Method or data member not found" problem in "Function json_ParseObject"

Change Dictionary to Scripting.Dictionary

Private Function json_ParseObject(json_String As String, ByRef json_Index As Long) As Scripting.Dictionary Dim json_Key As String Dim json_NextChar As String

Set json_ParseObject = New Scripting.Dictionary
Nick-vanGemeren commented 11 months ago

Peter,

VBA-JSON is written so that the same code can be used on both Mac and Windows. That is why the read.me file says: