You can check if anything is selected first:
VB Code:
If lstChar.SelectedItems.Length>0 Dim lv As ListViewItem = lstChar.SelectedItems(0) End if 'or If Not lstChar.SelectedItems.Length Is Nothing Dim lv As ListViewItem = lstChar.SelectedItems(0) End if




Reply With Quote