Hi there,
I have two listboxes, we'll call them ListBox1 and ListBox2. I have a button on my Form, that calls the following bit of code when clicked:
Code:For Each currentItem in ListBox1.SelectedItems ListBox2.Items.Add(currentItem) ListBox1.Items.Remove(currentItem) Next
This code doesn't work as it starts to complain about the selection having changed. What would be the preferred method to accomplish something like this? I'd be happy to get the whole selection from ListBox1 and bulk add/erase it. Does the ListBox object provide this kind of functionality?
Another Q, what is the difference between SelectionMode 'MultiSimple' and 'MultiExtended'. I have currently set it to MultiSimple on both ListBoxes.
Thanks,
Mightor




Reply With Quote