View Single Post
Join Date: Sep 2006
Posts: 3
Reputation: satellites101 is an unknown quantity at this point 
Solved Threads: 0
satellites101 satellites101 is offline Offline
Newbie Poster

Re: Removing First Line Of Text From multiline textbox

 
0
  #7
Aug 26th, 2008
Originally Posted by waynespangler View Post
If you want short and simple, try this:
  1. Dim b As String() = Split(TextBox1.Text, vbNewLine)
  2. TextBox1.Text = String.Join(vbNewLine, b, 1, b.Length - 2)
TY for all the replies. The code waynespangler posted hit the nail on the head on what I was looking for. I did have to change:
  1. TextBox1.Text = String.Join(vbNewLine, b, 1, b.Length - 2)
To
  1. TextBox1.Text = String.Join(vbNewLine, b, 1, b.Length - 1)
As it was, it deleted the first and last lines of the textbox. TYVM to all.
Reply With Quote