Jump to content

Need Visual Basic Help


Recommended Posts

Ok, I need to make a program that keeps track of birthdays. It needs to have a combo box as a drop down list, a textbox, and a command button. I have it up to here. Next, it says to enter code to make the text that you enter into the text box go into the drop down list. i get this far, but then i run into problems. first, the list only has one value no matter what, it just keeps overriding the previous input values. i have no idea what to do, and i hope i explained it clearly enough so someone can help me. i need to be able to add multiple birthdays to the drop down list and then have the text box clear, and be able to add more birthdays. i dont know the proper code to do this, and when i think i do, it gives me some sort of error message. please help me

Share this post


Link to post
Share on other sites

If I understand you right, you want to type a birthday into a textbox, click the command button and have it add it to the pick list of a combobox, right? In the picture below, I typed in two birthdays and they added to the drop down list and cleared the text box.

 

The command button has this click event:

 

Private Sub Command1_Click()

cmbBDay.AddItem txtBDay.Text

txtBDay.Text = ""

End Sub

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...