The goal is to create an array with the items in the declared range. Simple but I can't get it to work...
'Declaration
Dim Measures As Variant
Dim MeasureRows As Long
'Search and store
Sheets(4).Activate
MeasureRows = Range("A" & Rows.Count).End(xlUp).row
Measures = Range(Cells(2, 1), Cells(MeasureRows, 1)).Value2
MeasureRows populates fine but when I go to check Measures, it is empty. e.g.
?MeasureRows
780
?Measures(MeasureRows) 'Returns "Subscript out of range"
?Measures(1) 'Returns "Subscript out of range"
I'm very green when in comes to VBA so please excuse the basic question. I tried searching the web for answers but I couldn't get anything to work. I imagine I just don't know the right jargon for the search terms.