Dim nCounter As integer
Dim s As String
For nCounter = 0 To ListBox1.Items.Count - 1
If ListBox1.GetSelected(nCounter) = True Then
s = s & ListBox1.Items(nCounter)
End If
Next
label1.Text = s
this will get all items, even if they are not selected
Visual Basic:
Dim nCounter As Short
Dim s As String
For nCounter = 0 To ListBox1.Items.Count - 1
s = s & ListBox1.Items(nCounter)
Next
Label1.Text = s
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.