Link to home
Start Free TrialLog in
Avatar of andy7789
andy7789

asked on

VB.NET: Where is ListIndex property?

Hi x-perts,

I am migrating from VBA to VB.NET

where is listindex property for listboxes and comboboxes?

I have been comparing ListIndex with -1 to find, if nothing is selected, i.e.

myForm.ComboBox1.ListIndex = -1

how can I do it in VB.NET?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Joep_Killaars
Joep_Killaars
Flag of Netherlands 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
SOLUTION
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
As mentioned by Jeop,

you can use SelectedIndex  property
Avatar of andy7789
andy7789

ASKER

Thank you,

So, if nothing is selected, Combobox1.SelectedIndex = -1

correct?