title: Can't resolve VBA Array error 13 type mismatch
body: <p>I am trying to create a subset of an array. I google, read other posts etc, but I couldn't manage it. What am I doing wrong here?</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim startIndex As Long
  startIndex = 13
  Dim myArray As Variant
  myArray = tbl.ListRows(x).Range
  
  Dim sortArray As Variant
  Dim y, yy As Long
  y = 0
  yy = 1
  For y = startIndex To tbl.DataBodyRange.Columns.Count
      sortArray(yy) = myArray(1, y)
      yy = yy + 1
  Next
  </code></pre>
  
  <p>At <code>sortArray(yy)</code> it says a type mismatch, but I don't see one.<br>
  <code>sortArray(yy)</code> does mismatch to an integer which is in <code>myArray(1,y)</code>?</p>