vba - Add dict to dict

Viewed 26

I want to add a dictionary as an entry in another dict.

Dim jsonDictionary As New Dictionary

jsonDictionary(Cells(1, 1).Text) = Cells(1, 2).Text
Dim tempDict As New Dictionary
tempDict(Cells(2, 2).Text) = Cells(2, 3).Text
tempDict(Cells(3, 2).Text) = Cells(3, 3).Text
    
jsonDictionary(Cells(3, 1).Text) = tempDict

Last line throws an error. Any idea?

0 Answers
Related