Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default General Message Box Question


Whenever you prompt a message box, using this format:

returnvalue = MsgBox("Did you remember to log in your
name?",64,"Message")

If I had a long statement or wanted to add a second sentence, is it
possible
(or how do you), continue or put the second sentenceon another line?

Or does excel just place everything on one line?

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=374589

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default General Message Box Question

Sub a()
msg = "line1" & vbNewLine & "Line2"
returnvalue = MsgBox(msg, 64, "title")
End Sub


--
Regards,
Tom Ogilvy




"EMoe" wrote in message
...

Whenever you prompt a message box, using this format:

returnvalue = MsgBox("Did you remember to log in your
name?",64,"Message")

If I had a long statement or wanted to add a second sentence, is it
possible
(or how do you), continue or put the second sentenceon another line?

Or does excel just place everything on one line?

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile:

http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=374589



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default General Message Box Question

Use vbNewLine to break text up in to multiple lines. E.g.,

MsgBox "Line one" & vbNewLine & "Line two"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"EMoe" wrote
in message
...

Whenever you prompt a message box, using this format:

returnvalue = MsgBox("Did you remember to log in your
name?",64,"Message")

If I had a long statement or wanted to add a second sentence,
is it
possible
(or how do you), continue or put the second sentenceon another
line?

Or does excel just place everything on one line?

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile:
http://www.excelforum.com/member.php...o&userid=23183
View this thread:
http://www.excelforum.com/showthread...hreadid=374589



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default General Message Box Question


Hi Emoe

No problem, I appreciate the feedback.

However, it seem that our questions posts are now duplicated on the
Microsoft site, but (judging from the response) not the answers
posted!

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=374589

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default General Message Box Question


Good evening Emoe

There are two ways of doing it, both demostrated in this macro. Take
your pick.

Sub example()
MsgBox "This is line 1" & vbLf & "This is line 2" _
& Chr(13) & "This is line 3"
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=374589



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default General Message Box Question


It works!!! Thanks a bunch.

Regards,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=374589

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
A VERY General question Bons Excel Worksheet Functions 2 November 3rd 08 06:58 PM
General Question Ken Excel Discussion (Misc queries) 0 May 1st 08 05:48 PM
General Question Jared Jenner Excel Discussion (Misc queries) 2 July 20th 06 05:56 PM
General Question Easydoesit Excel Worksheet Functions 1 June 19th 05 07:14 AM
General Question Squid[_2_] Excel Programming 3 January 12th 04 07:25 PM


All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"