Actually, change this line:
a = a & Right(Text1.Text,Len(Text1.Text)-x)
to the following:
a = Right(Text1.Text,Len(Text1.Text)-x)
Should work now.
Printable View
Actually, change this line:
a = a & Right(Text1.Text,Len(Text1.Text)-x)
to the following:
a = Right(Text1.Text,Len(Text1.Text)-x)
Should work now.
VB Code:
a = InStr(1, Text1, vbCrLf) a = InStr(a + 2, Text1, vbCrLf) Text1 = Mid$(Text1, a + 2, Len(Text1))
Here's another way. Bit longer, but it works.
VB Code:
Private Sub Command1_Click() Dim vArray As Variant Dim iArray As Integer Dim sArray As String vArray = Split(Text1.Text, vbCrLf) For iArray = 2 To UBound(vArray) sArray = sArray & vArray(iArray) & vbCrLf Next iArray Text1.Text = sArray End Sub