New line in msgbox

  • Thread starter Thread starter Jone
  • Start date Start date
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
 
Hi Joone

You can do it like this


Sub boxer()


MsgBox "hello" & vbCrLf & "goodbye"


End Sub
 
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)
 
Back
Top