One has to be careful to be sure that you know if you are working with a 0 based array. Of course the listbox is 0 based. It is usually a matter of +/- 1 which can be done in the loop counter or the list index and index for the array.
Here is my example. Make a() Public if you need it for later in the code.
Private Sub CommandButton1_Click()
Dim i As Long, a() As Variant, s As String
With ListBox1
ReDim a(1 To .ListCount)
For i = 1 To .ListCount
a(i) = .List(i - 1)
Next i
End With
Unload Me
s = Join(a, vbCrLf)
MsgBox s
End Sub
Bookmarks