Connecting Strings

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi All,

How can I connect 2 line of strings, so my massage box will have lines.

i.e Data is missing!
check your entry



Thanks A lot,

Tom
 
Tom said:
Hi All,

How can I connect 2 line of strings, so my massage box will have
lines.
i.e Data is missing!
check your entry

MsgBox "Data is Missing" & vbCrLf & "check your entry"

Actually in the specific case of a MsgBox you don't need both a Carriage Return
and a Line-Feed so these would also work...

MsgBox "Data is Missing" & vbCr & "check your entry"
MsgBox "Data is Missing" & vbLf & "check your entry"

....but when doing similar things in other contexts you do need both so I tend to
always use vbCrLf. It will not cause two lines in a MsgBox so is harmless.
 
Thank you Rick, working good
Rick Brandt said:
MsgBox "Data is Missing" & vbCrLf & "check your entry"

Actually in the specific case of a MsgBox you don't need both a Carriage
Return and a Line-Feed so these would also work...

MsgBox "Data is Missing" & vbCr & "check your entry"
MsgBox "Data is Missing" & vbLf & "check your entry"

...but when doing similar things in other contexts you do need both so I
tend to always use vbCrLf. It will not cause two lines in a MsgBox so is
harmless.
 

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