Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2005

Tip: Looking for answers? Try searching our database.

how insert new line in MsgBox?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Charnes - 19 Aug 2005 22:41 GMT
In the [prompt] argument of MsgBox, how do I start text on a new line?  
Thanks.
Anne Troy - 20 Aug 2005 00:27 GMT
Did you want something like this? The vbCrLf is a return. The space and
underscore simply "continue" my code to the next line without breaking it.

Sub msgboxme()
MsgBox ("Blah blah " & vbCrLf & _
"and more blah blah " & vbCrLf & _
"and more blah blah blah.")
End Sub
************
Anne Troy
www.OfficeArticles.com

> In the [prompt] argument of MsgBox, how do I start text on a new line?
> Thanks.
Jezebel - 20 Aug 2005 00:43 GMT
Msgbox "Line 1" & vbcr & "Line 2"

> In the [prompt] argument of MsgBox, how do I start text on a new line?
> Thanks.
Jay Freedman - 20 Aug 2005 00:50 GMT
>In the [prompt] argument of MsgBox, how do I start text on a new line?  
>Thanks.

Insert the constant vbCr in the proper place, like this:

 MsgBox "Line 1" & vbCr & "Line 2"

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Jezebel - 20 Aug 2005 02:47 GMT
GMTA

>>In the [prompt] argument of MsgBox, how do I start text on a new line?
>>Thanks.
[quoted text clipped - 7 lines]
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org 
Jay Freedman - 20 Aug 2005 05:03 GMT
Precisely. :-)

>GMTA
>
[quoted text clipped - 9 lines]
>> Jay Freedman
>> Microsoft Word MVP        FAQ: http://word.mvps.org 

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.