I have a ListBox on my vb6 project and I've set its property to multiselect. Now, I want to get all of the selected items on my multiselect ListBox and put it in a variable for example, or maybe on a multiline textbox. I just wanted to get the multiselected values.
Unfortunately you must loop through all elements. Here is some sample code:
Dim k As Long
Dim s As String
For k = 0 To List1.ListCount - 1
If List1.Selected(k) Then
s = List1.List(k)
' ... do something
End If
Next
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With