title: How to fill a dynamic Array with other dynamic arrays or values mixed?
body: <p>Let's say you get a string of array-Dimensions from the Database. It would look something like this: <code>"[1][2][1]"</code> now you have a corresponding value, we shall call it B</p>
  
  <p>I have to create an array of this format: <code>(x,(B))</code></p>
  
  <p>if another Value, we call it A had this Dimension-String: <code>[1][1]</code>, the array shall be filled like this: <code>(A,(B))</code></p>
  
  <p>and if by chance there is another Value named C with the String<code>[1][2][2]</code> the array is supposed to look like this: <code>(A,(B,C))</code></p>
  
  <p>i thought of something like :</p>
  
  <pre><code>Redim Array1(1)
  Redim Array2(1)
  Array1(0) = A
  Array2(0) = B
  Array2(1) = C
  Array1(1) = Array2()
  </code></pre>
  
  <p>But that in a dynamic way. It seems to me, that vba does not support nested arrays.
  Unfortunately a Multi-dimensional array will not work, as the "dimensions" are not consistent. any help appreciated </p>
  
  <p>Edit: 
  tried: </p>
  
  <pre><code>c = 0
  dim array1() as Variant
  redim preserve array1(c)
  array1(c) = split(mid("[1][4]",2,len("[1][4]")-2),"][")
  </code></pre>
  
  <p>and it gave me a type mismatch error</p>