#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default MsgBox line break

I would like to add a line break to a message box. The VBA help file for
MsgBox says you can use a carriage return character (CHR(13)) or linefeed
character (Chr(10)), but I can't figure out how to use them.

What I have is something like this:

MsgBox("This is line #1"Chr(13)"This is line #2")

but this give me an error "Compile error: Syntax error"

Thanks for any help,
~ Horatio
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default MsgBox line break

MsgBox "This is line #1" & vblf & "This is line #2"
or
MsgBox "This is line #1" & chr(10) & "This is line #2"
or
MsgBox "This is line #1" & vbnewline & "This is line #2"



Horatio J. Bilge, Jr. wrote:

I would like to add a line break to a message box. The VBA help file for
MsgBox says you can use a carriage return character (CHR(13)) or linefeed
character (Chr(10)), but I can't figure out how to use them.

What I have is something like this:

MsgBox("This is line #1"Chr(13)"This is line #2")

but this give me an error "Compile error: Syntax error"

Thanks for any help,
~ Horatio


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default MsgBox line break

Thank you.

"Dave Peterson" wrote:

MsgBox "This is line #1" & vblf & "This is line #2"
or
MsgBox "This is line #1" & chr(10) & "This is line #2"
or
MsgBox "This is line #1" & vbnewline & "This is line #2"



Horatio J. Bilge, Jr. wrote:

I would like to add a line break to a message box. The VBA help file for
MsgBox says you can use a carriage return character (CHR(13)) or linefeed
character (Chr(10)), but I can't figure out how to use them.

What I have is something like this:

MsgBox("This is line #1"Chr(13)"This is line #2")

but this give me an error "Compile error: Syntax error"

Thanks for any help,
~ Horatio


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Break one line item into many... Tom Excel Worksheet Functions 2 August 7th 07 02:16 PM
Line break formula Cat Excel Discussion (Misc queries) 2 July 24th 07 03:46 PM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Line Break Ramthebuffs Excel Discussion (Misc queries) 4 August 22nd 05 08:52 PM
line break in a cell luvgreen Excel Worksheet Functions 2 June 14th 05 06:48 PM


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"