Combobox SelectIndex = 0 throws exception

  • Thread starter Thread starter STom
  • Start date Start date
S

STom

I am adding items to my combobox like this:
Me.cboDeprecType.Items.Add("X")
Me.cboDeprecType.Items.Add("Y")
Me.cboDeprecType.Items.Add("Z")

Me.cboDeprecType.SelectedIndex = 0

When I get to the selected index line, I get an index out of range error.

Any ideas why this might happen?

STom
 
Back
Top