title: Using an Array of Ranges in VBA - Excel
body: <p>Does VBA support using an array of range variables?</p>
  
  <pre><code>dim rangeArray() as range
  dim count as integer
  dim i as integer
  
  count = 3
  
  redim rangeArray(1 to count)
  
  for i = 1 to count
    msgbox rangeArray(i).cells(1,1).value
  next
  </code></pre>
  
  <p>I can't get it to work in this type of application. I want to store a series of ranges in a certain order as a "master copy". I can then add, delete, sort or do whatever to this array and then just print it out to a series of ranges in excel. It doesn't seem like excel supports this - it just forces you to store your data in the spreadsheet and you have to reread it in order to use it.</p>