9
Reply

Moving item from One ListBox to Another ListBox

buff daemon

buff daemon

Jul 29 2008 3:58 PM
24.1k

I am using the code posted by Kerry which adds all the Items from ListBox2 to ListBox1. Is there any way to add one selected item at a time from ListBox2 to ListBox1 and remove the items added to ListBox1 from ListBox2??

Below is the code used by me:

Me.ListBox1.DisplayMember = Me.ListBox2.DisplayMember
                Me.ListBox1.ValueMember = Me.ListBox2.ValueMember

                For Each item In Me.ListBox2.Items
                    Me.ListBox1.Items.Add(item)
                Next


Answers (9)