Find listview items.

newguy

Well-known member
Joined
Jun 30, 2008
Messages
611
Location
Denver Co, USA
Programming Experience
1-3
In a button_click event I want to check to see if no items were selected and use a msgbox to show that no items were selected before a procedure is done with the listview item text. I have tried :

VB.NET:
If listview1.selectedItems Is Nothing Then
   Msgbox("select an Item")
end If

Thanks...
 
VB.NET:
If contactsListView.SelectedItems.Count > 0I Then
  'Selected Items
Else
  'Nothing selected
End If
 
Back
Top