|
-
Feb 22nd, 2004, 04:34 AM
#1
Thread Starter
Member
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.
-
Feb 22nd, 2004, 04:45 AM
#2
Frenzied Member
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.
-
Feb 22nd, 2004, 04:48 AM
#3
Thread Starter
Member
Another Noobie Question [Resolved]
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|