Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
newline | New Users to Excel | |||
Insert newline in cell through formula (excel 2003) | Excel Worksheet Functions | |||
How to substitute a comma with a newline char using Replace. | Excel Discussion (Misc queries) | |||
How do I ignore newline character/carriage return while importing | Excel Discussion (Misc queries) | |||
DDE an Alt-Enter (Newline) character | Excel Programming |