Anton
Anton

Reputation: 79

itemsselected.count always returns 0 - ms access

I have a listbox where i want to get the values per column but the code below always returns itemsselected.count as 0

Dim item As Variant

    If Me.Lst_ProcVeri_CardInfo.ItemsSelected.Count <> 0 Then
        For Each item In Me.Lst_ProcVeri_CardInfo.ItemsSelected
            a = Me.Lst_ProcVeri_CardInfo.Column(1, item)
            b = Me.Lst_ProcVeri_CardInfo.Column(2, item)
        Next item
    End If

can anyone give advice on this?

Upvotes: 0

Views: 1755

Answers (2)

Richard Braxton
Richard Braxton

Reputation: 165

You may use ListIndex when not using EXTENDED to return the selected value's index.

Upvotes: 0

Anton
Anton

Reputation: 79

Always remember to set multi select function to EXTENDED!

Upvotes: 2

Related Questions