E
Elmo Watson
I've got this code, and it doesn't really work correctly:
For Each ind In Listbox1.SelectedIndices
Dim id As String = Listbox1.Items.Item(ind).ToString
Listbox2.Items.Add(id)
Listbox1.Items.remove(ind)
Next
I am trying to move items from Listbox1 to Listbox2 (by moving, I mean when
they are added to #2, I want to remove them from #1).
Every time I remove an item, it resets the index - - - I've been trying to
find sample code on the net, but apparently my search words aren't returning
the correct samples.
Can someone help me get this right?
For Each ind In Listbox1.SelectedIndices
Dim id As String = Listbox1.Items.Item(ind).ToString
Listbox2.Items.Add(id)
Listbox1.Items.remove(ind)
Next
I am trying to move items from Listbox1 to Listbox2 (by moving, I mean when
they are added to #2, I want to remove them from #1).
Every time I remove an item, it resets the index - - - I've been trying to
find sample code on the net, but apparently my search words aren't returning
the correct samples.
Can someone help me get this right?