title: VBA array length depending on a user input
body: <p>I wish to create a simple VBA array of doubles, but I want the array to have a length that is specified by a worksheet's cell value.</p>
  
  <p>I try to do:</p>
  
  <pre><code>Dim NIteration As Integer: NIteration = ActiveSheet.Cells(16, 2).Value
  
  Dim myArray(1 To NIteration) As Double
  </code></pre>
  
  <p>It fails with this error: "requires constant expression"</p>