I made a web browser appliction that stores every web address thats navigated. I recently made a form with a listview control in it where you can choose a web address and delete it from the control. The problem is, i can't get it to delete muiltiple items which are checked off. I have tried this code below but it comes back as "index out of bounds." What am I doing wrong?

dim i as integer
With ListView1
For i = .ListItems.Count - 1 To 0 Step -1
If .ListItem(i).Selected Then .ListItem.Remove (i)
Next
End With

Any suggestions/ideas on how to solve my problem?