Hi all,

I'm hoping some of you can help me.

Im writing a program where im trying to split some text imported from a textfile into a textbox into an array.

The array is undefined and i would like each piece of text to be an element in the array. I would then like to sort this information into alphabetical order.

This is the code I have at present; I apologise if any appears to be out of sequence or whatever, VB is a rather puzzling language to myself!

PS i have the code behind a button as you can tell from the code.
Thank you all for your time and patience.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim textInput As String
textInput = TextBox1.Text
Dim textArray() As String = TextBox1.Text.Split(","c)
Array.Sort(textArray)
Dim i As Integer

For i = LBound(textArray) To UBound(textArray)

TextBox2.Text = (textInput)

Next


End Sub