Q:

Arrays and ranges in vba

I am pretty much new to the vba. So, a simple question. In a worksheet I have cells filled with integers. Say, cells A1 to E1. I would like to store the data in an array and then to address to the specific values. Running the code below has an error "subscript out of range". What am I doing wrong? Thanks in advance.
Sub bounds()

    Dim Arr() As Variant

    Arr = Range("A1:E1")

    Debug.Print Arr(1)

End Sub

A:

An easier alternative can be to enumerate the values as that works with multidimensional arrays too:
Dim arr(), v ' As Variant is optional

arr = [A1:E1]

For Each v in arr
    Debug.Print v
Next

