Hard return

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
 
R

Rick Brandt

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.
 
J

Jon Ley

If you're writing this in VBA code, you can use the constant vbNewLine, e.g.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top