Results 1 to 5 of 5

Thread: [RESOLVED] Multi line in msgbox

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    45

    Resolved [RESOLVED] Multi line in msgbox

    how can i make a multi line in msgbox having a vbmsgboxstyle "vbokcancel"?

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Multi line in msgbox

    vb Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.     Dim msgRet As VbMsgBoxResult
    5.    
    6.     msgRet = MsgBox("This message" & vbCrLf & "runs on" & _
    7.         vbCrLf & "several lines", vbOKCancel)
    8.     If msgRet = vbOK Then
    9.         'User clicked OK.
    10.     ElseIf msgRet = vbCancel Then
    11.         'User clicked cancel.
    12.     End If
    13. End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    45

    Re: Multi line in msgbox

    tnx alot sir
    by the way, what does vbCrLf stands for?

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Multi line in msgbox

    Quote Originally Posted by Aisaki
    tnx alot sir
    by the way, what does vbCrLf stands for?
    CarriageReturn LineFeed. You can use vbNewLine also, they are the same.

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Multi line in msgbox

    Quote Originally Posted by DigiRev
    ...they are the same.
    Not quite. I believe that vbCrLf is a "hard coded" Carriage Return and Line Feed while vbNewLine is platform-specific and will contain whatever codes are appropriate to generate a new line on the specific platform.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width