Hard return

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

What is the character code for a hard return? I have a
text box that contains a string and I would like to force
a new line within that string.

Thanks in advance for your help!

Jason
 
Jason said:
What is the character code for a hard return? I have a
text box that contains a string and I would like to force
a new line within that string.

Chr(13) & Chr(10)

You need both and in that order.
 
If you're writing this in VBA code, you can use the constant vbNewLine, e.g.

MyTextBox = "The First Line" & vbNewLine & "The Second Line"
 
Back
Top