I have a function that converts an int to its actual string value, and it works constantly while I type the number in a textbox and the function converts it into a richtextbox.
The problem is that when it converts, i want to continue writing in a new line in the richtextbox so it can be printed as two lines on a paper.
Here is what i tried to do.
TextBox2.Text = " " & NumberToText(AmountBox.Text)
If TextBox2.Text.Length() > 60 Then
Four Hundreds Twenty Three Millions Four Hundreds Twenty -line1
Five Thousands Four Hundreds Twelve -line2
As Number to text as many return points you could use this intermediate function
Public Function NumberToTextSplitted(texto As String) As String 'Append this to what you are are already doing Dim rtn as strin = NumberToText(texto) Dim words As String() = rtn.Split(" ") Dim result As String = String.Empty For Each word As String In words If line.Length + word.Length >= 59 Then result &= Environment.NewLine End If result &= " " & word Next Return result