Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Extra Lines Inserted in Multi-Line Chart Titles Stuart Bratesman Charts and Charting in Excel 1 December 23rd 08 05:56 AM
MsgBox text on several lines mohavv Excel Discussion (Misc queries) 1 November 21st 07 08:17 PM
MsgBox With Multiple Lines? ianripping[_49_] Excel Programming 2 April 20th 04 11:41 AM
Using different lines in an input- or msgbox Syrus the Virus[_16_] Excel Programming 3 March 2nd 04 12:35 PM
Multiple lines in MsgBox NJF Excel Programming 3 January 13th 04 01:50 PM


All times are GMT +1. The time now is 08:52 AM.

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"