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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I enter carriage returns into a string 1

Status
Not open for further replies.

ChrisOjeda

Programmer
Apr 16, 2003
45
US
Hi!

I am trying to figure out what character to use so that I can create a string that has carriage returns embedded into so when I then send that string as the body of an email it all won't be on on line... Thanks... Chris
 
Do you mean like this? (ie: using vbCrLf?)

===========================================

Code:
dim sVar as string, sVar1 as string, sVar2 as string

sVar1 = "This should be on line one."
sVar2 = "This should be on line two."

sVar = sVar1 & vbcrlf & sVar2

msgbox sVar
 
That helps, though it would be eaiser if there exists a way to do it inside the quote (i.e. a particular character)?
 
BigTeeJay,

Actually, I decided I like your way better... It is cleaer code and easier to follow... Big thanks for taking time to help me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top