I have a form where i have 23 Comboboxes
. Writing SelectedIndex=-1
for every combobox will definitely work but i want to know whether there's any other way of doing it as done in below given example. ?
For Each ctl As Control In (GroupBox1.Controls)
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
Next
i tried this,
If TypeOf ctl Is ComboBox Then
ctl.selectedIndex=-1
End If
but it doesn't works. Please help me out.