Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default newline in a msgbox

hello...i can't get my msgbox to display multiple lines...can someone help me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default newline in a msgbox

MsgBox "The categorical total for SUPPLIES is: " & vbCrLf & )
cat &vbCrLf & " Have a great day!", vbOKOnly, "Category Total
for SUPPLIES

--
HTH

Bob Phillips

"greenjellystar" wrote in message
...
hello...i can't get my msgbox to display multiple lines...can someone help

me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a

great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default newline in a msgbox

greenjellystar,

MsgBox "First Line" & vbCrLf & "Second Line"
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"greenjellystar" wrote in message
...
hello...i can't get my msgbox to display multiple lines...can someone help
me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default newline in a msgbox

use chr(10)...
example msgbox "This is the first line" & chr(10) _
& "This is the second line"


"greenjellystar" wrote:

hello...i can't get my msgbox to display multiple lines...can someone help me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default newline in a msgbox

Hi,
Try with the vbNewline constant, something like:
MsgBox "First line" & vbNewLine & "Second line"
--
Regards,
Sébastien

"greenjellystar" wrote:

hello...i can't get my msgbox to display multiple lines...can someone help me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default newline in a msgbox

MsgBox "The categorical total for SUPPLIES is: " & _
vbNewLine & cat & vbNewline & _
" Have a great day!", vbOKOnly, "Category Total for SUPPLIES"

Other constants that will work in Windows

vbCrLf
vbCr
vbLf

But vbNewLine is better for compatibility with the Mac.
--
Regards,
Tom Ogilvy


"greenjellystar" wrote in message
...
hello...i can't get my msgbox to display multiple lines...can someone help

me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a

great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default newline in a msgbox

Hello Jessie,

I see a plethora of good examples. I prefer the vbNewLine, as stated, for
compatability/cross-platform issues. Plus it's just easier to read and
understand. One thing I generally do in my spreadsheets is in one (or a
central) Module, I will put this as a global constant ...

Public Const NL As string = vbNewline
Public Const DNL As string = vbNewline & vbNewLine

Then when I want a space I can use the NL constant, or the DNL constant for
a double new line. A MsgBox might then look like this ...

MsgBox "Hello!" & DNL & "How are you?" & NL & "Are you Ok?", vbYesNo,
"Check Me"


--
Regards,
Zack Barresse, aka firefytr

"greenjellystar" wrote in message
...
hello...i can't get my msgbox to display multiple lines...can someone help
me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default newline in a msgbox

Thanks to everyone...it worked...wahoo
:)


"greenjellystar" wrote:

hello...i can't get my msgbox to display multiple lines...can someone help me
with this...my code is below...

Worksheets("Sup 31xx").Range("M13").Formula = "='Sup 31xx'!$L$10+'Sup
32xx'!$L$10+'Sup 39xx'!$L$10+'Sup 4xxx'!$L$10"
Dim cat
cat = Worksheets("Sup 31xx").Range("M13")
MsgBox "The categorical total for SUPPLIES is: " & cat & " Have a great
day!", vbOKOnly, "Category Total for SUPPLIES"

thanks and have a great one, jessie :)


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
newline Tree*Rat New Users to Excel 9 October 21st 08 05:19 PM
Insert newline in cell through formula (excel 2003) Bart Wouters Excel Worksheet Functions 2 July 23rd 07 04:04 PM
How to substitute a comma with a newline char using Replace. edspyhill01 Excel Discussion (Misc queries) 9 July 30th 06 12:38 AM
How do I ignore newline character/carriage return while importing Achal Excel Discussion (Misc queries) 6 March 24th 05 02:24 AM
DDE an Alt-Enter (Newline) character Ross Field Excel Programming 2 May 13th 04 04:12 PM


All times are GMT +1. The time now is 03:00 PM.

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

About Us

"It's about Microsoft Excel"