Skip to main content
edited body
Source Link
Patrick Honorez
  • 25.4k
  • 12
  • 97
  • 163
Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 21) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1i, i1) Next i MsgBox "done" End Sub 
Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 2) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1, i) Next i MsgBox "done" End Sub 
Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 1) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(i, 1) Next i MsgBox "done" End Sub 
Source Link
Patrick Honorez
  • 25.4k
  • 12
  • 97
  • 163

Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 2) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1, i) Next i MsgBox "done" End Sub