I have a multi-select list box on a form with a button. When the user clicks the button, a VB onclick event runs that is supposed to open internet explorer and pass the selected values to an asp page. All that works fine except the passing of the selected values. How can I access the selected values of a list box in VB?
the above code does not work. As you can see, I'm trying to populate the variable "theList" with the selected values separated by commas.
Any suggestions?
thanks
Information is not Knowledge, Knowledge is not Wisdom, Wisdom is not Truth, Truth is not Beauty, Beauty is not Love, Love is not Music, Music is the best.
Code:
Dim theList As String
Dim i As Integer
theList = ""
For i = 0 To Me.theLstBox.ListCount - 1
If Me.theLstBox.Selected(i) Then
theList = theList & "," & Me.theLstBox.List(i)
End If
Next
the above code does not work. As you can see, I'm trying to populate the variable "theList" with the selected values separated by commas.
Any suggestions?
thanks
Information is not Knowledge, Knowledge is not Wisdom, Wisdom is not Truth, Truth is not Beauty, Beauty is not Love, Love is not Music, Music is the best.