Transforming Range to Array in VBA is actually a one liner – we take the range and we assign it to a variant:
1 2 3 4 5 |
Dim myRange As Range Set myRange = Range("a1").CurrentRegion Dim myArray As Variant myArray = myRange |
The “strange” part is that the array is converted to 2-dimensional array after this: and working…