MsgBox message on two lines?

  • Thread starter Thread starter Sandy
  • Start date Start date
S

Sandy

How do I get the following message to:
a) Split onto two lines in the message box (after the comma) and
b)Split it onto two lines within the code for readability?

MsgBox "You have missed out some entries, click OK and complete the list",
vbOKOnly, "Entries Missing"

Thanks
Sandy
 
msgbox "You have missed out some entries," _
& vbcrlf & _
"click OK and complete the list.", vbokonly, "Entries Missing"

this just enters one return
so it looks like this (return but no space between)

if you want it to enter two returns

so it looks like this (return & one line blank between)

msgbox "You have missed out some entries," _
& vbcrlf & _
vbcrlf & _
"click OK and complete the list.", vbokonly, "Entries Missing"

if you just wanted to split it within the code for readability:
msgbox "You have missed out some entries, " _ '<--***
& "click OK and complete the list.", vbokonly, "Entries Missing"


*** make sure you leave a space after the comma, or you'll end up with
"entries,click OK"
hth
:)
susan
 
Put a carraige return in the string:-

MsgBox "You have missed out some entries, " & Chr$(13) & "click OK and
complete the list", vbOKOnly, _
"Entries Missing"


Mike
 
Sorry Sandy missed the second bit. Use the Undescore but it must have a space
in
front of it:-

MsgBox "You have missed out some entries, " _
& Chr$(13) & "click OK and complete _the list", vbOKOnly, _
"Entries Missing"

Mike
 
Perfect Susan, thank you
Sandy

Susan said:
msgbox "You have missed out some entries," _
& vbcrlf & _
"click OK and complete the list.", vbokonly, "Entries Missing"

this just enters one return
so it looks like this (return but no space between)

if you want it to enter two returns

so it looks like this (return & one line blank between)

msgbox "You have missed out some entries," _
& vbcrlf & _
vbcrlf & _
"click OK and complete the list.", vbokonly, "Entries Missing"

if you just wanted to split it within the code for readability:
msgbox "You have missed out some entries, " _ '<--***
& "click OK and complete the list.", vbokonly, "Entries Missing"


*** make sure you leave a space after the comma, or you'll end up with
"entries,click OK"
hth
:)
susan
 

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