Listbox column selection

  • Thread starter Thread starter John
  • Start date Start date
Hi Tom,
Me.SomeListbox.Column(2)
will return the value in column 3 of the selected row.

That only works with a single select list box (Multiselect property set to
None). Try something like this, instead:


Function InterateSelections() As Variant
On Error GoTo ProcError

Dim varCategory As Variant

For Each varCategory In Me.SomeListbox.ItemsSelected()
Debug.Print Me.lboProjects.Column(2, varCategory)
Next varCategory

ExitProc:
Exit Function
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in InterateSelections Function..."
Resume ExitProc
End Function


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Me.SomeListbox.Column(2)
will return the value in column 3 of the selected row.

-Tom.
__________________________________________

:

Hi

How can I get the value of the third column of a multi-select list box?

Thanks

Regards
 

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

Back
Top