Hello everyone.
I'm working with a ComboBox which has 14 items.
Using the following code I got a problem
vb Code:
If Me.ComboBox1.SelectedIndex = 0 Then MsgBox("item 1") ElseIf Me.ComboBox1.SelectedIndex = 1 Then MsgBox("item 2") '... ElseIf Me.ComboBox1.SelectedIndex = 9 Then MsgBox("item 9") ElseIf Me.ComboBox1.SelectedIndex = 10 Then MsgBox("item 10") '... End If
The problem is that after the SelectedIndex = 9 it won't read properly the SelectedIndex = 10, it seems like it consider only the first number (1) instead of the whole one (10). In fact get the same result as if it was SelectedIndex = 1
What am I doing wrong?


Reply With Quote


