Message Box

  • Thread starter Thread starter David Tunstall
  • Start date Start date
D

David Tunstall

Please help!

I have a message box with about 30 words and I want to
split the message over 2 rows instead of in one long
string. I know it has something to do with (Chr(10)) or
(Chr(13)) but i'm unsure of how to use it.

Many Thanks
David
 
David Tunstall said:
Please help!

I have a message box with about 30 words and I want to
split the message over 2 rows instead of in one long
string. I know it has something to do with (Chr(10)) or
(Chr(13)) but i'm unsure of how to use it.


MsgBox "This is the first line." & vbCr & _
"This is the second line."

You can also do it by inserting any of these:

vbCrLf
vbNewLine
Chr(13)
Chr(13) & Chr(10)
 
Thanks very much!
-----Original Message-----



MsgBox "This is the first line." & vbCr & _
"This is the second line."

You can also do it by inserting any of these:

vbCrLf
vbNewLine
Chr(13)
Chr(13) & Chr(10)

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
MsgBox "Here is one line" & (chr(13) & "Here is another!"

That's all there is to it.

Andy
 
You can also use the following code which I use if there
is no data in a report. The message box comes up on two
lines.

Private Sub Report_NoData(Cancel As Integer)
MsgBox "No data found! Closing report." _
& "Please try another value.", vbExclamation
Cancel = True
End Sub
 
Peter said:
You can also use the following code which I use if there
is no data in a report. The message box comes up on two
lines.

Private Sub Report_NoData(Cancel As Integer)
MsgBox "No data found! Closing report." _
& "Please try another value.", vbExclamation
Cancel = True
End Sub

I can see no reason why that message would come up on two lines, and it
certainly doesn't for me. Are you sure you didn't leave a new-line
character out?
 
Back
Top