MrExcel Publishing
Your One Stop for Excel Tips & Solutions

More than one line in a Message Box


Posted by Jim on June 22, 2001 4:26 PM

How do I make my message go to the next line. The help window says to use "Chr(13), but what does this mean?


Posted by Russell on June 22, 2001 4:31 PM

Do this:

MsgBox "This is line one" & vbCrLf & "This is line two"

HTH, Russell

Posted by Joe Was on June 22, 2001 6:33 PM

As below you can also use Chr(13) in place of vbCrLf, the important part is the & before and after which ever line feed you use. JSW

Posted by lieuwe on June 22, 2001 11:08 PM

To get it even shorter use &"vbLf"& (Visual basic line feed)

Thus
Msgbox "Line one" & vbLf & "Line two"