Total Pageviews

Wednesday, September 14, 2016

Insert data from TextBox and InputBox into ListBox

Insert data from TextBox into ListBox in Visual Basic 2015



PrivateSub btnAdd_Click(sender AsObject, e AsEventArgs) Handles btnAdd.Click
 ListBox1.Items.Add(TextBox1.Text)
End Sub

Insert data from InputBox into ListBox in Visual Basic 2015



Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim myitemdata
        myitemdata = InputBox(“Enter your Item”)
        ListBox1.Items.Add(myitemdata)
End Sub

My Previews tutorial:  Working with TextBox control in Visual Basic 2015

No comments:

Post a Comment