Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carriage Return or New Line in a Concatenated Note

Status
Not open for further replies.

PRIreland

Technical User
Apr 24, 2006
16
US
This is a follow on from an earlier post where my problem was with Access. Now I'm in Excel and want to force a new line in a cell. When typing this manually, Alt-Enter causes a new line with a cell.

Is there a way to make this happen when concatenating text? I know the command sequence CHR(13)+CHR(10) worked in Access.

Patrick
 
in formula or in code ??

in formula

="Hello" & char(10) & "Goodbye"
cell alignment property must be set to WRAP as well

in code

msgbox("Text1" & vbcrlf & "Text2")

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
That was the problem, I didn't have the thing set to wrap text, thank you.

This site is great!!!!
Patrick

I used to work in an orange juice factory...I was canned because I couldn't concentrate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top