- The Visual Basic for Applications Constant for a carriage
return and line feed, vbCrLf.
-or- - The character codes for a carriage return and line feed, Chr(13) & Chr(10).
NOTICE: This is an Important Message!
and, you wanted the message to be displayed as
NOTICE:
This is an Important Message!
you would enter the message as a string expression as in either
of the following examples.
This is an Important Message!
- Example Using the Visual Basic for Applications Constant:
MsgBox "NOTICE:" & vbCrLf & "This is an Important Message!"
- Example Using the Character Codes:
MsgBox "NOTICE:" & Chr(13) & Chr(10) & "This is an Important Message!"