How to return and separate values from listbox?

topsykretts

Well-known member
Joined
Dec 22, 2011
Messages
47
Programming Experience
Beginner
VB.NET:
Public Class Form1   '//Add button     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         ListBox1.Items.Add("a=" & TextBox1.Text & " " & "b=" & TextBox2.Text & " " & "c=" & TextBox3.Text)         TextBox1.Text = ""         TextBox2.Text = ""         TextBox3.Text = ""       End Sub '//Remove button     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click         ListBox1.Items.Remove(ListBox1.SelectedItem)     End Sub   '//Edit button     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click         TextBox1.Text = ListBox1.SelectedItem()'//There is a problem because it returns all values into one textbox and I just wanna to separate values just like in input     End Sub
example.png
 
Firstly, your code is obviously not formatted correctly so please take the time and make the effort to post clearly. That would also require to actually post some words too, not just code and a picture. Please explain what you're trying to achieve and what the specific issue is that you're facing.
 
Back
Top