Is there a way to pass multiple selected items from a listbox into an array. For example:
I have listbox with 12 months, I want to only select 3 of them and then pass them to an array. Here is my sample code, but my array 'vtMonths' only comes back with the last selected item in the from the For Loop. Thanks for you help!
Private Sub CommandButton3_Click()
Dim vtMonths As Variant
Dim i As Integer

For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then _
vtMonths = Array(ListBox1.List(i),ListBox1.List(i), ListBox1.List(i))
Next i
Unload Me
Call MainMonth(vtMonths)
End Sub