Move all from Listbox1 to Listbox2
On May 10, 3:08*pm, Matthew Dyer wrote:
I have a form with two listboxes. I have a button on the form that,
once pushed, i'd like everything from listbox1 to move to listbox 2.
help? thanks!
I figured it out :-). For those curious, here is my solution:
Private Sub CommandButton2_Click()
Dim i As Integer
i = 0
Do Until ListBox1.ListCount = 0
ListBox2.AddItem ListBox1.List(i)
ListBox1.RemoveItem i
Loop
End Sub
|