Formatting in a Message Box

  • Thread starter Thread starter Al Mackay
  • Start date Start date
A

Al Mackay

Is it possible to format within a message box?

I currently have a message box which does nothing more than report the
version number of a spreadsheet that the person is using.

Code:

Sub Version()
MsgBox "** You are currently using Version 2.0 of this form **
(Form is validated as New_Supplementary_Form_V6_(Template).xls
End Sub

(The code all appears on one line @ the moment).

What I would like to be able to do is force a a character return in
before (Form is....).

Is this possible?

Many Thanks, Al ( (e-mail address removed) )
 
Hi Al

You can use Chr(10) -linefeed- or Chr(13) -carriage return- or vbNewLine
(which is a combination of them):

Sub test()
MsgBox "Hi there" & Chr(13) & "See you in" & Chr(10) & _
"row 3!" & vbNewLine & "That's it."
End Sub
 
There are constants for Chr(10) and Chr(13). They are vbLf and vbCr. As well
as vbNewLine, there is also vbCrLf.
 
Back
Top