Have filled a listview with checkboxes with ID, Lastname and firstname. I now want to add the ID to a collection but am having trouble identifying that all are in the collection. Here is what I have:
.listitems(i).checked always returns -1. If I use .selecteditem, that item is always selected and returns only the ID for that item even if several checkboxes are checked.
Any help would be great. thanx.
Kim
Code:
Dim i As Integer
Dim cCol As Collection
Dim lstItem
With listview1
For i = 1 To .ListItems.Count
If .ListItems(i).Checked Then
Set cCol = New Collection
lngID = .ListItems(i).Checked
ntCol.Add lngID
MsgBox lngID
End If
Next i
End With
Any help would be great. thanx.
Kim