Values in List Box

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.
 
K

Klatuu

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) & ", "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top