Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2002
    Location
    CT
    Posts
    361
    Thanks
    0
    Thanked 1 Time in 1 Post

    Force 2 lines in Message Boxes? (Excel XP)

    I use a lot of INPUT BOXES and YES/NO MESSAGES BOXES. They always default to one line of text, while sometimes the question being posed would be more clear if I could put it on two lines.

    Below are a couple examples of these boxes:



    Range("C37").Select
    ActiveCell.FormulaR1C1 = InputBox("Drip Cap Qty.:")

    and also

    If MsgBox("PICK UP ?", vbQuestion + vbYesNo) = vbYes Then



    Instead of "PICK UP ?" for example, I might like this to say:

    "PRESS YES FOR PICKUP"
    "PRESS NO FOR SHIP"

    with the two options on separate lines in the YES/NO box.

    Is this possible?

    Oh, by the way............it's great to have this forum back up and running !!!!!!!!!!!!!!!!!!!!!!!!!!

    Thanks,
    BH

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Force 2 lines in Message Boxes? (Excel XP)

    Yes, you can use vbLF:
    <code>If MsgBox("PRESS YES FOR PICKUP" & vbLf & "PRESS NO FOR SHIP", vbQuestion + vbYesNo) = vbYes Then</code>
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    3 Star Lounger
    Join Date
    Jan 2002
    Location
    CT
    Posts
    361
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Force 2 lines in Message Boxes? (Excel XP)

    Thank you Rory!
    BH

Posting Permissions

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