"John Doe, 1"
"Bob Brown,2"
I now would like to search the listbox if it contains either a "1" or a "2" which is does in this case and copy the item to another listbox. The 1 and 2 indicate positions I have a position listbox for each position. So 3 listbos, first one contains the names on form load, 2 other empty listboxes one for position 1 other for position 2...
I have tried the following
If xReservationListBox.SelectedIndex = xReservationListBox.FindString("1") Then
'MessageBox.Show("Found It")
xSpot1ListBox.Items.Add(xReservationListBox.Items(0))
End If
If xReservationListBox.SelectedIndex = xReservationListBox.FindString("2") Then
'MessageBox.Show("Found It")
xSpot2ListBox.Items.Add(xReservationListBox.Items(1))
End If
^this works but once you switch the names position the wrong name appears its wrong listbox...
This post has been edited by XMEGA: 29 November 2008 - 03:16 PM

New Topic/Question
Reply




MultiQuote






|