By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,655 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,655 IT Pros & Developers. It's quick & easy.

Newline or Return in MsgBox String

P: n/a
I would like to force a new line within the output string of MsgBox.
Anyone know how to do this?
Nov 13 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
MsgBox("I would like to force a new line within the output string of
MsgBox." & chr$(10) & "Anyone know how to do this?", vbYesNo, "Source")

"Weaver" <we*****@verizon.net> wrote in message
news:66**************************@posting.google.c om...
I would like to force a new line within the output string of MsgBox.
Anyone know how to do this?

Nov 13 '05 #2

P: n/a
On 25 Oct 2004 11:32:33 -0700, Weaver wrote:
I would like to force a new line within the output string of MsgBox.
Anyone know how to do this?

MsgBox "This is line 1." & vbNewLine & "This is line 2."

You can also use
vbCrLf
or...
chr(13) & chr(10)
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a
paii, Ron wrote:
MsgBox("I would like to force a new line within the output string of
MsgBox." & chr$(10) & "Anyone know how to do this?", vbYesNo, "Source")


I use vbcrlf
--
Tim
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #4

P: n/a
"paii, Ron" <pa**@packairinc.com> wrote in message news:<Jq********************@athenet.net>...
MsgBox("I would like to force a new line within the output string of
MsgBox." & chr$(10) & "Anyone know how to do this?", vbYesNo, "Source")


Alternately you might want to use the constant vbCrLf in place of chr$(10).

Bruce
Nov 13 '05 #5

P: n/a
Thank you all for your prompt responses.

BTW, I've been successfully concatenating strings with '+' instead of
'&'. Is that a problem waiting to jump up and grab me?

Chris.
Nov 13 '05 #6

P: n/a
"Weaver" <we*****@verizon.net> wrote in message
news:66**************************@posting.google.c om...
Thank you all for your prompt responses.

BTW, I've been successfully concatenating strings with '+' instead of
'&'. Is that a problem waiting to jump up and grab me?


If the strings were composed of digits the + sign would coerce them to numbers
and perform addition instead of concatenation.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #7

P: n/a
Weaver wrote:
I would like to force a new line within the output string of MsgBox.
Anyone know how to do this?


In A97 you could also do something like
MsgBox "This is@A test@of msgbox"
to get some bolding in the message
Nov 13 '05 #8

P: n/a
Null + string results in Null. Null & string results in string. In other
words, yes, you could run into problems if you're not careful.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Weaver" <we*****@verizon.net> wrote in message
news:66**************************@posting.google.c om...
Thank you all for your prompt responses.

BTW, I've been successfully concatenating strings with '+' instead of
'&'. Is that a problem waiting to jump up and grab me?

Chris.

Nov 13 '05 #9

P: n/a
try:

MsgBox vbTab & "I'm in the middle" & vbCrLf & "I'm on next line"

BillB
"Salad" <oi*@vinegar.com> wrote in message
news:na***************@newsread3.news.pas.earthlin k.net...
Weaver wrote:
I would like to force a new line within the output string of MsgBox.
Anyone know how to do this?


In A97 you could also do something like
MsgBox "This is@A test@of msgbox"
to get some bolding in the message

Nov 13 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.