oh and now i am trying to put that text form richtextbox.text to richtextbox2.text and for each 500 chars it should move onto a new line.
my code witch dont seem to work..
Code:Me.Start.LoadFile(Application.StartupPath & "\adress.txt", RichTextBoxStreamType.PlainText) Me.Start.SaveFile(Application.StartupPath & "\Adressbkup.txt", RichTextBoxStreamType.PlainText) Dim m As String Dim i As Integer Dim i2 As Integer Dim i3 As Integer Dim testing As String i2 = 1 For i2 = 0 To Start.Lines.LongLength If Slut.Text = "" Then i3 = 0 i = i + 500 m = Start.Text.Trim.Substring(i3, i) testing = Slut.Text() Slut.Text = m i = i + 500 Else i3 = i3 + 500 i = i + 500 testing = Slut.Text & ControlChars.Lf Slut.Text = testing m = Start.Text.Trim.Substring(i3, i) Slut.Text = m End If Next i2




Reply With Quote