Results 1 to 7 of 7

Thread: [RESOLVED] ComboBox.SelectedIndex can't go higher than 9?

Threaded View

  1. #1

    Thread Starter
    Junior Member Dendari's Avatar
    Join Date
    Feb 2012
    Posts
    23

    Resolved [RESOLVED] ComboBox.SelectedIndex can't go higher than 9?

    Hello everyone.

    I'm working with a ComboBox which has 14 items.

    Using the following code I got a problem
    vb Code:
    1. If Me.ComboBox1.SelectedIndex = 0 Then
    2.     MsgBox("item 1")
    3. ElseIf Me.ComboBox1.SelectedIndex = 1 Then
    4.     MsgBox("item 2")
    5.     '...
    6. ElseIf Me.ComboBox1.SelectedIndex = 9 Then
    7.     MsgBox("item 9")
    8. ElseIf Me.ComboBox1.SelectedIndex = 10 Then
    9.     MsgBox("item 10")
    10.     '...
    11. 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?
    Last edited by Dendari; Apr 24th, 2012 at 07:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width