Still working on the Pod Player rewrite, but I have a problem. When a user clicks on an item in the Genre list, the program is supposed to check the fourth ListSubItem in each ListItem in the lstSong ListView control and compare it with the selected item in the ListBox lstGenre. If the texts match, leave the ListItem alone. If they are different, remove the entire ListItem in lstSong. I'm trying to do that with this code:
However it removes only one ListItem in lstSong and throws up an "Index out of bounds" error. How can I get it to work right?Code:Dim i For i = 1 To lstSong.ListItems.Count If lstSong.ListItems.Item(i).ListSubItems.Item(4).Text <> lstGenre.List(lstGenre.ListIndex) Then lstSong.ListItems.Remove i End If Next i




Reply With Quote
