title: Vba Add Collection into object property
body: <p>How can I add collection into the object.property ? It keeps giving me an error. What am I doing wrong?
  I wanna get a tree structure, I mean inside one property(for example value) would be a collection which has another objects with collections...</p>
  
  <pre><code>Option Explicit
  
  Public name As String
  Public value As Variant
  Public ValueType As String
  Public valueHelp As Collection
  
  Function addColl()
  
      Dim i As Long
      For i = 1 To 5
          Dim nextCollection As Collection
          Set nextCollection = New Collection
          Dim obj1 As JsonElement
          Set obj1 = New JsonElement
  
  
          obj1.name = "City" &amp; i
          obj1.value = "type"
          obj1.ValueType = nextCollection
          nextCollection.Add obj1
          'obj1.valueHelp = nextCollection
          'nextCollection.Add nextCollection
  
      Next
  
  End Function
  </code></pre>