VBA - Load Array from sheet
Sub LoadArray() Dim strArray As Variant Dim TotalRows As Long TotalRows = Rows(Rows.Count).End(xlUp).Row strArray = Range(Cells(1, 1), Cells(TotalRows, 1)).Value MsgBox "Loaded " & UBound(strArray) & " items!" End Sub
Source: stackoverflow.com