Archie
April 17th, 2001, 05:54 PM
Does anyone know what code to add to this existing code so that a msgbox pops up if there are no items in the list box and I push the remove button. Thank you.
Private Sub cmdRemove_Click()
Dim i As Integer
For i = lstShopping.ListCount - 1 To 0 Step -1
If lstShopping.Selected(i) = True Then
lstShopping.RemoveItem i
End If
Next i
End Sub
Archie Kantzavelos
Private Sub cmdRemove_Click()
Dim i As Integer
For i = lstShopping.ListCount - 1 To 0 Step -1
If lstShopping.Selected(i) = True Then
lstShopping.RemoveItem i
End If
Next i
End Sub
Archie Kantzavelos