Hi
newbie needing to know how to declare an array where we don't know how many elements due to always increasing
I have a list in A1 to A10 and need to use lastrow to declare array
also would like to display msgbox after the loop to give a list of all items (don't know if this would be join or split function)
thanks for any help
MC
Dim lastrow As Long
lastrow = Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row).Count
Dim i As Long
Dim fileArray(1 To lastrow) As String
For i = 1 To lastrow
MsgBox fileArray(i)
Next i
newbie needing to know how to declare an array where we don't know how many elements due to always increasing
I have a list in A1 to A10 and need to use lastrow to declare array
also would like to display msgbox after the loop to give a list of all items (don't know if this would be join or split function)
thanks for any help
MC
Dim lastrow As Long
lastrow = Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row).Count
Dim i As Long
Dim fileArray(1 To lastrow) As String
For i = 1 To lastrow
MsgBox fileArray(i)
Next i