Results 1 to 6 of 6

Thread: Multi Lined Message Box?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Is there a way to make a mulilined message box? If so, how?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    dim msg as string
    msg = "help me out" & vbcrlf
    msg = "please help me out" & vbcrlf
    msg = msg & vbcrlf
    msg = msg & "Sure hope you get it!"
    msgbox = msg
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    or you can use the vbNewLine constant, like this
    Code:
    Private Sub Command1_Click()
    
    MsgBox "This" & vbNewLine & _
           "Is" & vbNewLine & _
           "A" & vbNewLine & _
           "Test!"
    
    End Sub

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    This is the code I have:


    Code:
    Private Sub CommandButton1_Click()
    If Range("O2").Text = "When I Am Typing My Name in the Employee Name Box, my name does not appear. What do I do?" Then
    Dim msg As String
    msg = "- Make sure you have triple clicked your mouse INSIDE the employee name box." & vbCrLf
    msg = "- Make sure you are typing your LAST name first." & vbCrLf
    msg = "- Make sure you put a comma and a space after your last name." & vbCrLf
    msg = "- If your name does not appear as you are typing it, scroll through the list and locate it manually."
    MsgBox = vbOK
    End If
    End Sub
    Then it comes up with this:

    COMPILE ERROR
    Function call on left-hand side of assignment must return Variant or Object.

    What am I doing wrong?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  5. #5
    Lively Member
    Join Date
    Aug 2000
    Location
    Ontario, Canada
    Posts
    79
    Msgbox is a function and you cannot assign a value to it.

  6. #6
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    CoreyS, incorrect, the code should be:

    Code:
    Private Sub CommandButton1_Click()
    If Range("O2").Text = "When I Am Typing My Name in the Employee Name Box, my name does not appear. What do I do?" Then
    Dim msg As String
    msg = "- Make sure you have triple clicked your mouse INSIDE the employee name box." & vbCrLf
    msg = msg & "- Make sure you are typing your LAST name first." & vbCrLf
    msg = msg & "- Make sure you put a comma and a space after your last name." & vbCrLf
    msg = msg & "- If your name does not appear as you are typing it, scroll through the list and locate it manually."
    MsgBox msg
    End If
    End Sub
    That should do it!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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