Carriage Return

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

How do I insert a carriage return into a message box text?

Thanks in advance!

Kevin
 
Kevin said:
How do I insert a carriage return into a message box text?

Thanks in advance!

MsgBox "This is line one" & vbCrLf & "This is line two"
 
Rick,

I knew it was something like that, but could not remmember
exactly what to use.

Thanks much!

Kevin
 
How do I insert a carriage return into a message box text?

Use the vbCrLf VBA constant:

Dim strMsg As String
strMsg = "This is the first line" & vbCrLf & "This is the second"
MsgBox strMsg, vbYesNo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top