Carriage Returns in Message Box

  • Thread starter Thread starter Simon Webb
  • Start date Start date
S

Simon Webb

I have some code which validates operator input and will produce a list of
errors (error 1, error2 ...).

The list of errors is recorded as a single text string and displayed via the
message box. Is it possible to force a carriage return and have each error
message on a new line?

Thanks in advance

Simon
 
I believe both of these will work in vba. The first one will also work in a
text box on a form if you ever need it.

= "This is line 1." & chr(13) & chr(10) & "This is line 2."

= "This is line 1." & vbcrlf & "This is line 2."
 
Back
Top