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 Question


I am having a serious lapse of knowledge right now...

How do I make a msgbox have multiple lines of text instead of one
ongoing line.

ex.
msg = "Q1: ------------------------------" & _
"Q2: ------------------------------"
style = vbokonly
title = Test"

msgbox msg, style, title

When I do this, I get Q1: ----------------- Q2:---------------- and I
need them on 2 lines.


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=479281

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default msgbox Question

Use the concatenate operator '&' to include Chr(10) in your string of
text.

ie MsgBox ("Hello there" & Chr(10) & "How are you")
should display:

Hello there
How are you

Chr(10) works a little like someone having pressed Return mid-sentence.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default msgbox Question


Hello Dok112,

Add a Carraige Return Line Feed to the end of of line to start a new
one...

msg = "Q1: ------------------------------" & vbCrLf & _
"Q2: ------------------------------"
style = vbokonly
title = Test"


This will give you 2 lines.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=479281

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
MsgBox question Ken Loomis Excel Programming 5 July 5th 05 06:56 PM
MsgBox Question Ray Batig Excel Programming 1 December 23rd 03 03:42 AM
MsgBox question gareth Excel Programming 2 November 19th 03 05:30 PM
Msgbox question Pancho Excel Programming 4 October 23rd 03 05:36 PM
MsgBox Question Chip Pearson Excel Programming 1 September 29th 03 05:56 PM


All times are GMT +1. The time now is 05:34 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"