Msg Box - Line breaks in middle of warning text? How?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Quick question really to which I can't seem to find an answer.

I have a msgbox that appears upon the clicking of a field, the message is
quite long winded and would be better spaced out into seperate paragraphs,
but how the hell do I insert line breaks into the middle of text on a msg
box? :S
 
Richard,

Try something like:

vMessage = "I have a msgbox that appears upon the " & vbCrLf & _
"clicking ofa field, the message is " & vbCrLf & _
"quite long winded and would be better spaced out " & vbCrLf & _
"into seperate paragraphs, but how the hell do I " & vbCrLf & _
"insert line breaks into the middle of text on a msg box?"

MsgBox vMessage

HTH,
Nikos
 
You can do it with CrLf as suggested by Nikos... going back to old typewriter
days of Carriage Return then Line Feed, or you can call those two characters
with their appropriate Chr() number but personally I prefer this, because at
an immediate visual reference, you know EXACTLY what its for:-

Msgbox "this is line one" & vbNewLine & "this is line two"
 
Back
Top