F
Fuzzhead
I have a userform with two list boxes. The first listbox is loaded from a
table with the following line from my macro: ListBox1.List() = myArray. With
myArray as Variant. I also used the following so I can pick more than one
item: ListBox1.MultiSelect = fmMultiSelectMulti.
When I pick from the list in ListBox1 and click on my commandButton2 with
the following code nothing happens. The picked items from ListBox1 are not
added to ListBox2.
Private Sub CommandButton2_Click()
If ListBox1.ListIndex > -1 Then
ListBox2.AddItem ListBox1.Text
ListBox1.ListIndex = -1
End If
End Sub
What am I doing wrong?
table with the following line from my macro: ListBox1.List() = myArray. With
myArray as Variant. I also used the following so I can pick more than one
item: ListBox1.MultiSelect = fmMultiSelectMulti.
When I pick from the list in ListBox1 and click on my commandButton2 with
the following code nothing happens. The picked items from ListBox1 are not
added to ListBox2.
Private Sub CommandButton2_Click()
If ListBox1.ListIndex > -1 Then
ListBox2.AddItem ListBox1.Text
ListBox1.ListIndex = -1
End If
End Sub
What am I doing wrong?