title: Can you declare jagged arrays in excel VBA directly?
body: <p>In my project I work a lot with jagged arrays, i.e. arrays of which the elements are also arrays. </p>
  
  <p>Up until know I only managed to define these arrays like this:</p>
  
  <pre><code>dim subarray(1 to 3) as Integer
  dim MyArray(1 to 5) as Variant
  subarray(1) = 40
  subarray(2) = 50
  subarray(3) = 60
  
  MyArray(1) = subarray
  </code></pre>
  
  <p>But I would like to do something like this:</p>
  
  <pre><code>dim MyArray(1 to 5)(1 to 3) as Variant/Integer
  MyArray(1)(1) = 40
  </code></pre>
  
  <p>The example above doesn't compile. Is there a similar, valid way to declare nested arrays directly?</p>
  
  <p>EDIT: The right term is 'jagged array' not 'nested array'.</p>
  
  <p>EDIT2: Edited the example values, to prevent confusion between indices and values.</p>