View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Is Multi line possible with MsgBox

Is it possible to have this in multiple lines, instead of just one single
line?

MsgBox "An Error as occurred in the Save file to folder. This Macro will
now
TERMINATED"


The string chr(13) will provide a carriage return. For example

MsgBox "An Error as occurred in the Save file to folder." & chr(13) &
"This Macro will now
TERMINATED"


Or, you can use the built-in VB constant for carriage returns, vbCr...

MsgBox "An Error as occurred in the Save file to folder." & vbCr & "This
Macro will now TERMINATED"

If you want a blank line between the sentences for visual looks reasons, use
two vbCr characters...

MsgBox "An Error as occurred in the Save file to folder." & vbCr & vbCr &
"This Macro will now TERMINATED"

Note: I'm sure your newsreader will split the above lines into more than one
line, but they are just single code lines.

Rick