line break in a message box

J

jnew

Greetings,

This may be simple, but I can't find an answer in the
help system. My message box prompt will consist of two
sentences. I'd like to display each sentence on its own
line. How do I code in the line feed and carriage return?

jn
 
C

Cheryl Fischer

Try this:

MsgBox "This is the first line. " & Chr(13) & Chr(10) & "This is the
second line."


hth,
 
P

PC Datasheet

Msgbox "FirstSentence" & VbCrLf & "SecondSentence"

Will look like:
FirstSentence
SecondSentence

Msgbox "FirstSentence" & VbCrLf & & VbCrLf & "SecondSentence"

Will look like:
FirstSentence

SecondSentence
 

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