Link to home
Start Free TrialLog in
Avatar of PeterBaileyUk
PeterBaileyUk

asked on

Which Listbox event in vb.net

I have a listbox which has multiple selection enabled, I have a combo box on the form and I would like that to be populated by those selected in the listbox.

so if I select the first item in the listbox the combo gets updated to include that item, when another item is selected then the combo gets that row added.

Not sure which event to use

I have this code:

 For Each Item In ListCW.SelectedItems
                    If Not String.IsNullOrWhiteSpace(Item) Then
CBCWSelectedItems.additem Item.ToString()
                    Else
                        'do nothing whitespace
                    End If
                Next

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PeterBaileyUk
PeterBaileyUk

ASKER

That did exactly what it needed to do thank you Fernando.
Not a problem Peter, glad to help.