I need to make a string for a description textbox so later it can be added into a listbox and I dont know how to do this and this is all I got, which isnt much

Dim desripition As String

Private Sub textbox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles textbox2.TextChanged
        ' dont know how to do the code for this
    End Sub

its probably 1 line of code. All I need to do is the user enters some text for a description of something and it gets saved as a string, could someone help me

Recommended Answers

All 3 Replies

desripition = TextBox2.Text

thats it? I thought there would be more then that

>>thats it?...
I'm afraid so, :D.

Adding that code to the textbox2.TextChanged event, it will constatly set the TextBox2's value to it while typing in your TextBox2.

If you need to add the String's value to a ListBox, use ListBox1.Items.Add(desripition) '// add String to ListBox. .

commented: I'm afraid so :) +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.