Display Text In a Msgbox On Multiple Lines

Hints and tips home » VBA hints and tips » Display Text In a Msgbox On Multiple Lines

Display Text In a Msgbox On Multiple Lines

When displaying text in a MsgBox you may need to show it over multiple lines. To do this use:

vbCrLf

As in:

MsgBox "The System has detected an error." & vbCrLf & "Contact your System Administrator"

The first sentence in quotes will appear above the second in the MsgBox.


Added by Carlos on 24th November 2006

More VBA hints and tips, like:

Training courses
London & UK

Live dates & prices »

On-site training

Get a quote »

 

rssRSS feeds

What's this?

All hints and tips:

RSS feed