Results 1 to 3 of 3

Thread: About MsgBox

  1. #1

    Thread Starter
    Lively Member newace's Avatar
    Join Date
    Mar 2001
    Posts
    127

    About MsgBox

    Can i center my wordings in a message box? If there is a way, how do i do so?

  2. #2
    Lively Member
    Join Date
    Apr 2001
    Location
    The Netherlands
    Posts
    112
    i presume you are talking about short messages. Normally the MSgBox's with is adapted to the lengt of the message, with a minimum with for the buttons.

    If your message is short u can try and add spaces or to the message. this will only work if the message isnt variable

    remvs

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    It is possible, even with variables, but you need to cleverly code it together.

    If you are that serious, find out how many characters can be displayed in a message box on a single line. That will be the max length of a line for your code. Any string that crosses this limit will have to be broken up into more than one string and be joined with a vbCrLf.

    Each individual line will be padded to the left and right so that the length of the resultant string is equal to the max length.

    Display the strings concatenated with vbCrLfs in the message box.

    Ask back if you find any of the above stuff difficult.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

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