title: How can I convert multi-dimensional array into a date variableand use month function?
body: <p>I have included in my comments where the program fails. Your help would be greatly appreciated! Thank you!</p>
  
  <pre><code>Function sumByAcct(month As Integer, acct As String) As Long
      Dim array_length As Integer
  
      array_length = Application.WorksheetFunction.Count(Sheets("Transactions").Range("A:A")) + 1
  
      ReDim array_data(array_length, 3) As Variant
      For i = 0 To (array_length)
          array_data(i, 1) = Sheets("Transactions").Range("A" &amp; i + 2) '=&gt; Dates
          array_data(i, 2) = Sheets("Transactions").Range("E" &amp; i + 2) '=&gt; Amounts
          array_data(i, 3) = Sheets("Transactions").Range("H" &amp; i + 2) '=&gt; Bank Account
  
          Dim func_date As Date
          Dim func_month As Integer
          func_date = CDate((array_data(i, 1))) 'program doesn't run this code
          func_month = month(CDate(func_date)) 'program doesn't run this code
  
          MsgBox (func_date)
      Next
  End Function
  </code></pre>