It is very simple, I would like to add a line to a textbox that already contain lines.
I supposed it would be
Textbox.Text = "new line" & Chr(x) & Textbox.Text
but I haven't found it yet
Printable View
It is very simple, I would like to add a line to a textbox that already contain lines.
I supposed it would be
Textbox.Text = "new line" & Chr(x) & Textbox.Text
but I haven't found it yet
Hi there, try this.
Textbox.Text = vbCR & vbLF & Chr(x) & Textbox.Text
Hope this can help 'ya ...
try this:
Say if Text1 contains "Hello", and you run the above code it will becomeCode:Text1.Text = "Insertion Text" Chr(10) & Text1.Text
Insertion Text
Hello
ok :)
Did you actually try your code, da_silvy? :)
You need to add an ampersand (&) between "Insertion Text" and the newline character, and using Chr(10) won't work...it just puts a vertical bar in the text.
Try this:
These also work the same way:Code:Text1.Text = "Insertion Text" & vbNewLine & Text1.Text
Code:Text1.Text = "Insertion Text" & vbCr & vbLf & Text1.Text
'...or...
Text1.Text = "Insertion Text" & vbCrLf & Text1.Text
'...or...
Text1.Text = "Insertion Text" & Chr(13) & Chr(10) & Text1.Text