Comments

: Hi,: : When I have a textstring like: subject="This is" + Chr(13) + "a test": : So that it will print on 2 lines: when I put it in the textbox.text: then it's 1 line and where the Enter suppose to be there's a black square.: : How to fix this ?: : Many Thanks: You can do that by setting the Text Box Multiline property to True.

: That one is already set to True.: When I just type in the box, then everything is normal.: But when I do it like that then it's just 1 row, even if multiline is enabled.: : Perry: What I can say is if you want to make a new line you should use VBnewline consonant or Chr(13) & chr(10)

: Hi,: : When I have a textstring like: subject="This is" + Chr(13) + "a test": : So that it will print on 2 lines: when I put it in the textbox.text: then it's 1 line and where the Enter suppose to be there's a black square.: : How to fix this ?: : Many Thanks:

Try:

subject = "This is" & vbCRLF & "a test"

Always use the ampersand for string concatenation, not the plus sign. This could lead to problems if numerical strings are involved.

: That one is already set to True.: When I just type in the box, then everything is normal.: But when I do it like that then it's just 1 row, even if multiline is enabled.: : Perry: What I can say is if you want to make a new line you should use VBnewline consonant or Chr(13) & chr(10)

: : Hi,: : : : When I have a textstring like: subject="This is" + Chr(13) + "a test": : : : So that it will print on 2 lines: : when I put it in the textbox.text: : then it's 1 line and where the Enter suppose to be there's a black square.: : : : How to fix this ?: : : : Many Thanks: : : : Try:: : subject = "This is" & vbCRLF & "a test": : Always use the ampersand for string concatenation, not the plus sign. This could lead to problems if numerical strings are involved.: :

Since very early on in computers ('60s?), a new line is represented byLF (line feed) CHR$(13) hex 0DCR (carriage return) CHR$(10) hex 0AThis was for control of line printers, telytypes and electronic typewriters. It's stuck. Use "debug" on the command line to see 0D 0A in any text file for a new line.

vbCRLF represents 0D 0A concatenated in the right order which is why Machaira's solution is good.