I have a Textbox and a MultiSelect listbox with following values
When i enter the values in the text box and click on search it should select the particular values in the listbox. I'm Using the below code
Private Sub Search_Click()
Dim str As String
Dim c As Collection
Dim strArray() As String
Dim intcnt As Integer
str = txtAnswer.Value
strArray = Split(str, ",")
For Each itm In strArray
lstAnswer.Selected (itm)= True
Next
End Sub
I want to get the below result
But It selects the index instead of values. for Example
How to select the values instead of index?


