Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Breaking a Dialog Box/MsgBox) into 2 lines 2

Status
Not open for further replies.

WallT

Vendor
Aug 13, 2002
247
0
0
US
Can somebody please help me with this. How can I have a message break into two lines using the Access Message Dialog Box? Some of my messages are detailed and real long:


MsgBox "Blah Blah Blah extra long message", vbCritical

I tried this without success...maybe somebody can fix this for me:

MsgBox "Blah Blah Blah" & Char(13) + Char(10)& "Extra long message", vbCritical
 
And what about this ?
MsgBox "Blah Blah Blah" & vbCrLf & "Extra long message", vbCritical

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That's perfect...thank you again.
 
How are ya WallT . . .

Here's a sample:
Code:
[blue]   Dim Msg As String, Style As Integer, Title As String
   Dim NL As String, DL As String
   
   NL = vbNewLine [green]'NewLine[/green]
   DL = NL & NL   [green]'DoubleLine or Line Space[/green]
   
   Msg = "Line1" & NL & _
         "Line2 (on newline)!" & DL & _
         "Line3 (after line space)!"
   Style = vbInformation + vbOKOnly
   Title = "Test Lines! . . ."
   MsgBox Msg, Style, Title[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Try the Eval with the msgbox and you'll get the first line emphasised
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top