Hi,
I'm totally new in using VB and I want your help.
I need a sample code that has a (combobox) and an (add) button that makes the user clicks on the (add) button to add text to the (combobox).
Thank you.
Hi,
I'm totally new in using VB and I want your help.
I need a sample code that has a (combobox) and an (add) button that makes the user clicks on the (add) button to add text to the (combobox).
Thank you.
Public Class Form1
Private Sub btnAdd_Click(sender As System.Object, e As System.EventArgs) Handles btnAdd.Click
ComboBox1.Items.Add(Now)
End Sub
End Class
Each time you click "Add", the current date/time will be added to the combobox. Just replace the argument with the text you want to add.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.