I have 15 names in column A. While trying to ReDim and populate an already declared array, and extracting the elements (names) into column E, the following code gave me hiccups saying that it was run-time error 1004 (application-defined or object-defined error).
Dim f() as string
Private Sub CommandButton1_Click()
Finalrow = Cells(Rows.Count, 1).End(xlUp).Row
ReDim Preserve f(Finalrow - 1)
For i = 0 To Finalrow - 1
f(i) = Sheet1.Cells(i, 1) ''''This line causes the glitch (error 1004)
Next
For i = 0 To Finalrow - 1
Sheet1.Cells(i, 5) = f(i)
Next
End Sub