Results 1 to 3 of 3

Thread: Another Noobie Question [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2004
    Location
    I live in Oregon, U.S.A.
    Posts
    41

    Wink Another Noobie Question [Resolved]

    I'm trying to list items in a combo box. But for some reason, I get 2 of the same thing entered in. here is my code...

    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Private Sub comboBox_Change()

    comboBox.Text = "Select which conversion you would like."
    comboBox.AddItem ("Dog years to human years.")

    End Sub

    Private Sub Form_Load()

    comboBox.Text = comboBox.List(0)

    End Sub

    ~~~~~~~~~~~~~~~~~~~~~~~~~

    The output from this code is

    | Select which conversion you would like. |
    {Drop down 1 = Dog years to human years.}
    {Drop down 2 = Dog years to human years.}

    Don't understand why this is happening.

    Joe
    Last edited by shishkabob; Feb 22nd, 2004 at 04:49 AM.
    I'm a noobie when it comes to programming, please teach me, so I can also have the advantages of making my own programs, and money.

  2. #2
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Combo box change fires when you change it, so when you set the text in it, that changes it firing the event. Add the item on form_load instead.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2004
    Location
    I live in Oregon, U.S.A.
    Posts
    41

    Another Noobie Question [Resolved]

    Thank you!
    I'm a noobie when it comes to programming, please teach me, so I can also have the advantages of making my own programs, and money.

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