title: Looping through 8204 variable type (array of variants)
body: <p>I'm having some trouble looping through a variant array (8204 variable type).  I'm am seeking input via an input box (type 8) and would like the user to be able to ctrl+ multiple disjointed ranges and cells.  The problem that I am running into is that when I try and loop through those selected ranges it only picks up the first one. </p>
  
  <p><strong>Here's a working example of the issue:</strong></p>
  
  <pre><code>Sub myarray()
      MyAnswer = Application.InputBox("Pick a description cell(s) in spreadsheet for the link" _
          &amp; vbNewLine &amp; "(Hold Ctrl to select multiple cells)", Type:=8)
      ' if its type 8204
      If VarType(MyAnswer) = 8204 Then
          MsgBox "Length of array:  " &amp; UBound(MyAnswer)
          ' loop through each element in the array
          For Each vvalue In MyAnswer
              MsgBox vvalue
          Next
      End If
  End Sub
  </code></pre>
  
  <p>in the prompt type the following or select some ranges using ctrl+:</p>
  
  <pre><code>$A$12:$A$13,$B$4:$C$4,$D$4
  </code></pre>
  
  <p>for some reason I can only pick up the first range <code>$A$12:$A$13</code> when I would like to loop through all elements in all the ranges/cells.</p>
  
  <p>Any help is much appreciated. Thanks!</p>