It common to see data being converted into a single string before adding to a list box and then doing some complex string processing to recreate the original data.
There is a better way:
1) Add objects to the listbox
2) Tell the listbox how to display the object via the Format event
By doing this the original data is never lost and can be easily recovered by casting back from Object to the actual type.
So in your case the objects will be arrays of strings containing the contents of the 3 textboxes, simulated in the example by the arrays data1 and data2.
Private Sub AddArrayItems()
Dim data1 As String() = {"One", "Two", "Three"}
Dim data2 As String() = {"X", "Y", "Z"}
listBox1.Items.Add(data1)
listBox1.Items.Add(data2)
End Sub
Private Sub listBox1_Format(sender As Object, e As ListControlConvertEventArgs)
Dim data As String() = DirectCast(e.Value, String())
e.Value = String.Join("-", data)
End Sub
Private Sub listBox1_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim data As String() = TryCast(listBox1.SelectedItem, String())
If data IsNot Nothing Then
label1.Text = data.Length.ToString() & " selected items"
End If
End Sub
The code was converted from C# so hopefully it's almost correct .
Alan