Wouldn't this have been easier, to avoid using an index in the first place:
For Each itm as ListItem In ListView1.Items
If itm.Text = strName Then
Also, assuming you only want to get the first, and possibly only, match, you can insert in an:
after the MsgBox.