Hi,
I have a listbox(MultiSelect: 2 - Extended) in which I set ItemData index values for every item that goes into the box. I'll call this listbox myListBox.
The ItemData index values match their respective ID's from a mysql database.
What I need to be able to do is to:
Select multiple items at once and delete those selected items from the database
I found this code through Google.
<code>
Private Sub cmdMovetoRight_Click()
Dim i As Integer
If List1.ListIndex = -1 Then Exit Sub
For i = List1.ListCount - 1 To 0 Step -1
If List1.Selected(i) = True Then
List2.AddItem List1.List(i)
List1.RemoveItem i
End If
Next i
End Sub
</code>
What I need to be able to do is to use this code in some manner with myListbox above. I need to be able to return the ItemData index value of myListBox.Selected(i) using the code above.
Does anyone know how to do this?
Any help would be grately appreciated.