msg box
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: msg box

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    how do i make it so the writing in a msg box appear in more then 2 lines

    like ; line1
    line2

    and make them align in centre?

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Leiden, The Netherlands
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Add a carriage return character (Chr(13)) between the lines:

    Msgbox "Line1" & Chr(13) & "Line2".

    I don't think it's possible to center the lines. You'll need to create a user form to do that.

    Marc

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Las Vegas Nevada USA
    Posts
    239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can center the lines like this.

    MsgBox " Line One" & vbcr & " Line Two"

    Have a great day

    (Leave spaces between the quote mark and the first word. I did but the post didn't show it)

    [ This Message was edited by: GeorgeB on 2002-03-21 06:06 ]

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    Just what paelinck said with alittle more

    "Message line one here" & chr(13) & _
    "Message line two here" & chr(13) & _
    " Ect... " & chr(13)

    Notice Ect...

    You can work with blank spaces to center
    your message, but it's a pain.

    If you know how, create a userform with
    labels....

  5. #5
    New Member
    Join Date
    Feb 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thx it worked

  6. #6
    Board Regular
    Join Date
    Mar 2002
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Now that you are a regular, you should change your name

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com