title: pass array of values to VBA class
body: <p>I created account class in VBA (ClsAccount), I want to assign Amount property which take an arry of values (for example a revenue ClsAccount can have amount 100 , 200, 300 each one for different year)</p>
  <pre><code>    Private AccAmount() As Variant
  
  Property Let amount(amt() As Variant)
  For Each i In amt
  AccAmount(i) = amt(i)
  Loop
  End Property
  
  Property Get amount() As Variant
  amount() = AccAmount()
  End Property
  
  Private Sub Class_Initialize()
  
  End Sub
  
  Sub test()
  
  
  Dim revenue As New ClsAccount
  Dim arr(1) As Variant
  
  arr(0) = 100
  arr(1) = 200
  
  revenue(0) = arr(0)
  revenue(1) = arr(1)
  
  MsgBox revenue(0)
  MsgBox revenue(1)
  
  End Sub
  </code></pre>
  <p>I am getting this error:</p>
  <p><a href="https://i.stack.imgur.com/vK4Lj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vK4Lj.png" alt="enter image description here" /></a></p>