If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
2 more questions on message boxes
Question One:
When entering lengthy notes in the VB screen, how do I put a line break in that does't mess up the code? I'm really just asking for a line break to make it easier for me to enter and edit the message box text. Question Two: What is the code I use to name the message box; the text in the blue header of the message box? Thanks for your answers! |
#2
|
|||
|
|||
2 more questions on message boxes
1) You may find it easier to place the text into a variable then use the
variable in the MsgBox. Example: strMsg = "This is a long message." & vbCrLf & "That needs a line break" MsgBox strMsg, vbOkOnly + vbExclamation, "My Message Box" or, if you need a return value: lngRetValue = MsgBox(strMsg, vbYesNo + vbQuestion, "My Message Box") vbCrLf is a built-in constant for Carraige Return/Line Feed. You could also concatenate in two Chr() functions with the appropriate character numbers, but the constant is easier. Another option, if you have a really long message, is to break up the message into multiple lines as you assign it to the variable. Example: strMsg = "This is a long message." & vbCrLf & "That needs a line break" strMsg = strMsg & vbCrLf & "I decided to add a third line." 2) Adding text to the blue title bar of the message box is done by the last argument in the example above. In this case, the blue title bar will show "My Message Box" (without the quotes). -- Wayne Morgan MS Access MVP "Glenn in Los Angeles" wrote in message ... Question One: When entering lengthy notes in the VB screen, how do I put a line break in that does't mess up the code? I'm really just asking for a line break to make it easier for me to enter and edit the message box text. Question Two: What is the code I use to name the message box; the text in the blue header of the message box? Thanks for your answers! |
#3
|
|||
|
|||
2 more questions on message boxes
Hi,
I know it's cheating but download this nifty little utilty from Arvin Meyers site. http://www.datastrat.com/Download/MsgBox.zip regards John "Glenn in Los Angeles" wrote in message ... Question One: When entering lengthy notes in the VB screen, how do I put a line break in that does't mess up the code? I'm really just asking for a line break to make it easier for me to enter and edit the message box text. Question Two: What is the code I use to name the message box; the text in the blue header of the message box? Thanks for your answers! |
#4
|
|||
|
|||
2 more questions on message boxes
On Mon, 12 Dec 2005 14:45:03 -0800, Glenn in Los Angeles wrote:
Question One: When entering lengthy notes in the VB screen, how do I put a line break in that does't mess up the code? I'm really just asking for a line break to make it easier for me to enter and edit the message box text. Question Two: What is the code I use to name the message box; the text in the blue header of the message box? Thanks for your answers! I think your referring to the text in the code window itself, not in the displayed message box itself, correct? Add a space and underscore at the end of your code line, then continue on the next line. MsgBox "This is a very long line on the screen." _ & "This is on the next line." The above will appear all on one line in the message itself. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#5
|
|||
|
|||
2 more questions on message boxes
Yes, that's exactly what I was looking for. Thanks,
"fredg" wrote: On Mon, 12 Dec 2005 14:45:03 -0800, Glenn in Los Angeles wrote: Question One: When entering lengthy notes in the VB screen, how do I put a line break in that does't mess up the code? I'm really just asking for a line break to make it easier for me to enter and edit the message box text. Question Two: What is the code I use to name the message box; the text in the blue header of the message box? Thanks for your answers! I think your referring to the text in the code window itself, not in the displayed message box itself, correct? Add a space and underscore at the end of your code line, then continue on the next line. MsgBox "This is a very long line on the screen." _ & "This is on the next line." The above will appear all on one line in the message itself. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Questions in creating Message Box.... | Paul | Using Forms | 3 | May 16th, 2005 01:11 AM |
Combo boxes producing error message | Tom U | New Users | 3 | April 26th, 2005 09:32 PM |
Old error message dialog boxes seem to have disappeared? | Bob Saucier | General Discussion | 1 | March 14th, 2005 06:41 PM |
Ms-Access 2003 | RC | General Discussion | 23 | January 19th, 2005 08:22 PM |
OE: ""OE has not yet downloaded this message" | Emily Lin | Outlook Express | 4 | August 6th, 2004 03:03 AM |