title: Reverse an array in Excel VBA
body: <p>I have the following code, which based on the logic it should work.</p>
  
  <p>I want it to be (4,3,2,1), but at the end of the loop I get t=(4,3,3,4)</p>
  
  <pre><code>Sub try()
  
    Dim t As Variant
  
    t = Array(1, 2, 3, 4)
    a = UBound(t)
  
    For k = 0 To a
      t(k) = t(a - k)
    Next k
  
  End Sub
  </code></pre>
  
  <p>Any ideas?</p>