We are trying to work within your constraints, but you are trying to use a multi select listbox as though it were single select. As noted, it seems you are stuck with using the listbox collection or iterating through the entire list to see if an item is selected. In the first case:
Code:
Dim varItem As Variant, yourVariable As Variant
Dim ctl As Control
Set ctl = Me.Needs
For Each varItem In ctl.ItemsSelected
yourVariable = ctl.ItemData(varItem)
Debug.Print yourVariable
Next
OR as ItsMe has suggested, or a variation (missing declarations):
Code:
For intCurrentRow = 0 To ctlSource.ListCount - 1
If ctlSource.Selected(intCurrentRow) Then
strItems = strItems & ctlSource.Column(0, _ intCurrentRow) & ";"
End If
Next intCurrentRow
I think none of these will work as you wish as long as the listbox is multi select.