title: How can I know if there is no item selected in a listview?
body: <p>I have a delete button in a userform that removes the selected item from the listview. The problem is that when there isn't an item selected (at least it is not highlighted) it removes the first item. How can I know if there is no item selected, so I can avoid removing anything?</p>
  
  <p>Here is what I've tried, and it still removes the first Item when there isn't anything selected.</p>
  
  <pre><code>Private Sub CommandButtonDelete_Click()
      If Not (ListView1.SelectedItem Is Nothing) Then
         ListView1.ListItems.Remove ListView1.SelectedItem.Index
     End If
  End Sub
  </code></pre>
  
  <p><b>Edit:</b></p>
  
  <p>The problem seems to be that there is always an item selected. So, new question, how can I unselect the item when the user clicks outside the listView? </p>