I keep getting a type mismatch error when I try to run my code. I'm trying to store number in an array and then calculate their sum.
Sub Exercise()
Dim Sum As Integer
Dim A(1 to 5) As Integer
A(1) = 35
A(2) = 71
A(3) = 42
A(4) = 53
A(5) = 109
Sum = 0
Sum = (Sum + A)
For A = 1 To 5
Next Sum
MsgBox Sum
End Sub