title: Is there a way to assign values to an Option Base 1 array in VBA using a single line?
body: <p>I am assigning integers (11 in total) to an array with index 1 to 11, one index at a time.</p>
  
  <p>Is there a way to do it in one line, similar to how it is done for example in Matlab.</p>
  
  <p>How I am doing it now:</p>
  
  <pre><code>Dim cols(1 To 11) As Integer
  
  cols(1) = 2
  cols(2) = 3
  cols(3) = 5
  cols(4) = 6
  cols(5) = 7
  cols(6) = 9
  cols(7) = 10
  cols(8) = 13
  cols(9) = 14
  cols(10) = 15
  cols(11) = 16
  </code></pre>
  
  <p>How I would like to do it:</p>
  
  <pre><code>Dim cols(1 To 11) As Integer
  
  cols = [2,3,5,6,7,9,10,13,14,15,16]
  </code></pre>
  
  <p>I am aware that it can be done without defining the variable as an array, but that returns the array with index 0 to 10: </p>
  
  <pre><code>Dim cols As Variant
  
  cols = Array(2,3,5,6,7,9,10,13,14,15,16]
  </code></pre>