VB.Net Add ITem To ComboBox

How To Add Value To A Combobox Using Visual Basic.Net 

vbnet add items to combobox

In This VB.Net Tutorial  We Will See How To Insert Values To ComboBox From TextBox Or Another ComboBox On Button Click In Visual Basic.Net Programming Language And Visual Studio Editor.


Project Source Code:

Public Class AddValueToCombobox

    Private Sub BTN_ADDVal_Click(sender As Object, e As EventArgs) Handles BTN_ADDVal.Click

       ' add value from textbox
        ComboBox1.Items.Add(TextBox1.Text)
       ' add value from textbox in specific index
        ComboBox1.Items.Insert(0, TextBox1.Text)
        ' add value from another combobox
        ComboBox1.Items.Add(ComboBox2.SelectedItem)

    End Sub
End Class
      
///////////////OUTPUT:





add item to combobox using vb.net




Share this

Related Posts

Previous
Next Post »