That was exactly the issue .. Thank you!
Is there any way to easily tell what delimiter is being used in the future?
THe code works great when the user pastes from a text editor, but when they
paste from Exel, each entry seems to have a tab after it. Any easy way to
make sure that the data is text and convert it if its not. I am not have
any luick with idata..
"Chris Hyde" <ch*****@nodirecwayspam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Microsoft wrote: I have a multine list that I would like to split into an array. I paste
it into a richtext box and go from there, but it just makes the first part
of the array the whole list with little boxes inbetween. Here is the code
Dim userdata As String
Dim serverarray As String()
Dim servercount As Integer
userdata = RichTextBox1.Text
serverarray = userdata.Split(vbCrLf)
Console.WriteLine(serverarray(0))
The delimeter for your lines might NOT be both a vbCr (carriage return)
and a vbLf (line feed); it could also be one or the other.
I would venture a guess that your line is delimited by vbLf's...try
splitting on that instead and see if you get the desired results.
HTH...
Chris