New line in msgbox

J

Jone

Ho do I make a new line in a msgbox in VBA ?
I know in a macro msgbox is this a new line "@" But looks like not in VBA
 
N

Naz

Hi Joone

You can do it like this


Sub boxer()


MsgBox "hello" & vbCrLf & "goodbye"


End Sub
 
S

Stuart McCall

Jone said:
Ho do I make a new line in a msgbox in VBA ?
I know in a macro msgbox is this a new line "@" But looks like not in VBA

Dim msg As String

msg = "This is the first line" & vbCrLf
msg = msg & "and this is the second line." & vbCrLf
msg = msg & "Geddit?"

Debug.Print MsgBox(msg, vbQuestion + vbYesNo)
 
Top