I’m writing a program that needs to split text in a RichTextBox by a new line. I’ve tried
For Each Line As String In RichTextBox1.Text.Split(vbNewLine)
And I’ve tried
For Each Line As String In RichTextBox1.Text.Split(System.Enviroment.NewLine)
Neither are working. It works if there’s only one line of text but not after that. Any suggestions?
I guess the easiest way to do it is to use RichTextBox.Lines like so
Not sure why splitting by Environment.NewLine didn’t work for you though, it worked fine for me when I just tested.
Edit: Just noticed the comment on the question, oops. That’ll teach me for being slow with posting.