title: Subscript out of range VBA error when setting an array equal to a range
body: <p>Currently, I have a range of strings that I would like to be able to enter into an array.  However, I'm not sure that it's working and every time I try to do anything with the array, I get a subscript out of range error.  I tried just doing a Debug.Print to see if values are going into the array or not but that resulted in the same error.  Here's what I have so far..</p>
  
  <pre><code>UsedRow = ActiveWorkbook.Sheets(3).UsedRange.Rows.Count
  Dim ProjectCounter As Long
  Dim ArrRange As Range
  
  'This determines the number of entries in the array (I know this part works)
  i = UsedRow
  ProjectCounter = 0
  Do While Cells(i, 1).FormulaR1C1 &lt;&gt; vbNullString
      ProjectCounter = ProjectCounter + 1
      i = i - 1
  Loop
  
  'Array should have dimensions that match the number of projects
  Dim ProjectArray() As Variant
  ReDim ProjectArray(ProjectCounter - 1)
  
  'Set range for array to cover
  Set ArrRange = ActiveWorkbook.Sheets(3).Range("A" &amp; UsedRow - ProjectCounter &amp; ":A" &amp; UsedRow)
  
  'Populate array with projects
  ProjectArray = ArrRange
  
  For i = LBound(ProjectArray) To UBound(ProjectArray)
  Debug.Print ProjectArray(i)
  Next
  </code></pre>
  
  <p>Is this the right way to set up an array?  And if not, what am I doing incorrectly? Thanks.</p>