title: excel vba moving non-contiguous range selection to an array
body: <p>In the situation where the user select two non-contiguous column ranges i wrote the following:</p>
  
  <pre><code>Dim count long
  Dim points variant
  Dim i long
  
  Set user_range = ActiveWindow.RangeSelection
  
  count = user_range.count / 2
  
  ReDim points(1 To count, 1 To 2)
  
  For i = 1 To count
  
      MsgBox "value is" &amp; user_range.Areas.Item(1).Value(i,1)
  
      points(i, 1) = user_range.Areas.Item(1).Value(i,1)
  
      points(i, 2) = user_range.Areas.Item(2).Value(i,1)
  
  
  Next i
  </code></pre>
  
  <p>But i get an object error when i try this. Am i indexing Value wrong?</p>
  
  <p>This should work right? Is there an easier way to do this?</p>
  
  <p>Any help is greatly appreciated!</p>
  
  <p>Thanks,</p>
  
  <p>Russ</p>