ilovevbsomuchimmad
Programmer
Hi, I was wondering if anybody out there could help me out a little bit. I have two list boxes and 2 buttons, there are items in listbox 1 and the first button adds the items to the list box2, the second button only removes items from listbox2 and does not alter any of the items in list box1. As the items in listbox are linked to a data base the following coding was used with the add button:
What i really really need help with is If an item is selected from Listbox2 (To be removed), I JUST want the item to be selected in list box1, well I have the following coding:
I have changed the SelectedItems to FindStringExact and other methods as Listbox1 contains DataRowView objects and ListBox2 contains String objects but still none of them seem to be working. Please could you give me any suggestions?
Code:
Listbox2.Items.Add(ListBox1.GetItemText(ListBox1.SelectedItem))
What i really really need help with is If an item is selected from Listbox2 (To be removed), I JUST want the item to be selected in list box1, well I have the following coding:
Code:
If Listbox2.Items.Count > 0 Then ListBox1.SelectedItem = Listbox2.Items(Listbox2.Items.Count - 1)
End If
I have changed the SelectedItems to FindStringExact and other methods as Listbox1 contains DataRowView objects and ListBox2 contains String objects but still none of them seem to be working. Please could you give me any suggestions?