Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
By using "Msgbox", I want to have multi-lines in 1 msg-box. Is thi possible? Please help. Thanks. Joh -- jt4 ----------------------------------------------------------------------- jt46's Profile: http://www.excelforum.com/member.php...fo&userid=1515 View this thread: http://www.excelforum.com/showthread.php?threadid=26786 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Hi John
MsgBox "Line1" & Chr(13) & "line2" & Chr(13) & "Line3" -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
The alternative to Soniya's is to use vbCrLf instead of
Chr(13). Geof. -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Hi John
And yet another example: Private Sub CommandButton1_Click() Money = Format(10, "$##,##0.00") MsgBox "Please bring " & vbLf & _ "a #2 Pencil " & vbCr & _ "a sheet of paper " & Chr(13) & _ "and " & Chr(13) & Chr(13) & _ "at Least " & vbTab & Money & _ " ! ", vbOKOnly, "Good Luck TK" End Sub Good Luck TK -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Use the vb constant vbcr for a carriage return or vbcrlf for a
carriage return with line feed On Sat, 9 Oct 2004 05:04:13 -0700, "Soniya" wrote: Hi John MsgBox "Line1" & Chr(13) & "line2" & Chr(13) & "Line3" -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
It's better to use the VBA constants such as VBcr or VBcrlf
On Sat, 9 Oct 2004 05:04:13 -0700, "Soniya" wrote: Hi John MsgBox "Line1" & Chr(13) & "line2" & Chr(13) & "Line3" -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
On Sat, 9 Oct 2004 05:04:13 -0700, "Soniya"
wrote: Hi John MsgBox "Line1" & Chr(13) & "line2" & Chr(13) & "Line3" -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Sometimes Chr(13) etc don't work in VBA.
Better to use the VB constants such as VBcr or VBcrlf Ths emove the pointer down to the next line and never fail that I know of. On Sat, 9 Oct 2004 05:04:13 -0700, "Soniya" wrote: Hi John MsgBox "Line1" & Chr(13) & "line2" & Chr(13) & "Line3" -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Use vbcr for carriage return or vbcrlf to put in a line feed.
Chr(13) does not always work however trhe vb constants do On Sat, 9 Oct 2004 05:04:13 -0700, "Soniya" wrote: Hi John MsgBox "Line1" & Chr(13) & "line2" & Chr(13) & "Line3" -----Original Message----- By using "Msgbox", I want to have multi-lines in 1 msg- box. Is this possible? Please help. Thanks. John -- jt46 --------------------------------------------------------- --------------- jt46's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 . |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
the vb constant vbNewLine is designed to work both with the PC and the
MAC. since no one else has mentioned it . . . <g -- Regards, Tom Ogilvy "jt46" wrote in message ... By using "Msgbox", I want to have multi-lines in 1 msg-box. Is this possible? Please help. Thanks. John -- jt46 ------------------------------------------------------------------------ jt46's Profile: http://www.excelforum.com/member.php...o&userid=15154 View this thread: http://www.excelforum.com/showthread...hreadid=267861 |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Another alternative would be to use vbnewline for example: msgbox "I want to start a new line" & vbnewline & "here. -- uece ----------------------------------------------------------------------- uecem's Profile: http://www.excelforum.com/member.php...fo&userid=1513 View this thread: http://www.excelforum.com/showthread.php?threadid=26786 |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Msgbox w/ multi-lines
Try the following: Dim intResponse As Integer intResponse = MsgBox("Click Yes or No.", vbYesNo) If intResponse = vbYes Then MsgBox "You clicked Yes." ElseIf intResponse = vbNo Then MsgBox "You clicked No." End If : -- uece ----------------------------------------------------------------------- uecem's Profile: http://www.excelforum.com/member.php...fo&userid=1513 View this thread: http://www.excelforum.com/showthread.php?threadid=26786 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extra Lines Inserted in Multi-Line Chart Titles | Charts and Charting in Excel | |||
MsgBox text on several lines | Excel Discussion (Misc queries) | |||
MsgBox With Multiple Lines? | Excel Programming | |||
Using different lines in an input- or msgbox | Excel Programming | |||
Multiple lines in MsgBox | Excel Programming |