-
I have made great use of the checkbox feature in the list in VB6, but I can't figure out how to tell which one is selected (has the blue background, can be moved w/ keyboard arrows). In a regular listbox it used the .selected property. Now that is whether the item is checked true or false. Can I have my cake and eat it too?
-
the .listindex property will tell you which one is selected (zero based). -1 means no item is selected.
-
-
If you mean want to find out how many items are checked then take a look at the Selected property:
Code:
Dim i As Integer
Dim strItems As String
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
strItems = strItems & List1.List(i) & vbCrLf
End If
Next
MsgBox strItems
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819