Values in List Box

  • Thread starter Thread starter Gsurfdude
  • Start date Start date
G

Gsurfdude

Hello,

I have a multi select list box control on a form and I need to return the
values of highlighted multi select items. Code
With Me.lstExtractRouteMulti
For Each varItem In .ItemsSelected
If Not IsNull(varItem) Then
Debug.Print
End If
Next
End With

In this, I need to return the values that are selected in the list box.

Using Me.lstExtractRouteMulti.Value returns Null

Thanks.
 
Using Me.lstExtractRouteMulti.Value returns Null
Yes it does because it is a multi select list box.

In the code you posted, you would put the logic to get the items where the
Debug.Print line is. For example, if you wanted to put them all in one
string separated by commas:

strListResults = .ItemData(varItem) & ", "
 
Back
Top