Consulting

Results 1 to 5 of 5

Thread: Multi line MsgBox

  1. #1
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location

    Multi line MsgBox

    I know I have found this somewhere but I for got where. How can you make a Msgbox more than one line?
    Peace of mind is found in some of the strangest places.

  2. #2
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by austenr
    I know I have found this somewhere but I for got where. How can you make a Msgbox more than one line?
    if I understand your question correctly, simply insert a "line feed" into the Prompt string each time you want to go to the next line. For example:

    Msgbox "this is the first line" & vbcrlf & "and this is the second"
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  3. #3
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Thanks. Was missing an & sign. Solved.
    Peace of mind is found in some of the strangest places.

  4. #4
    Possibly easier to remember is vbNewLine. It does exactly the same thing.
    Hope that helps.
    Get the free Excel based Toolbar or click here for free examples & Excel Consultancy

    RoyUK

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by royUK
    Possibly easier to remember is vbNewLine. It does exactly the same thing.
    More importantly, it also works on the Mac.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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