Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Dear loungers,

    I have a message box that have several lines and the last three lines I want to indent but also align the equals symbol in the line each of which which looks something like " yes = save and exist" is this possible?

    thank you....... liz

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Unfortunately you have rather limited control over what gets displayed in a Message Box. For one thing you can't do much with the font used, and in addition, it is a porportional font, so positioning things precisely is very difficult if not impossible. One of the things you can do is control where lines break by inserting vbCrLf or Chr(13) & Chr(10) at appropriate points. Hoever you may want to consider displaying a form if you want it to appear more polished, and in that case you can label the buttons properly so you don't have to explain what they mean.
    Wendell

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    371
    Thanked 1,457 Times in 1,326 Posts
    Liz,

    You can also use the constant vbTab to try to line thing up but it's trial and error to get it right, or at least close.

    Here's an example of constructing a string to be used in the msgbox:
    Code:
      zErrorData = "Data Type Requested: " & vbTab & zDatatypes(iDataType) & vbCrLf & _
                   "Data Value Passed: " & vbTab & vbTab & zStrValue & vbCrLf & _
                   "Lower Limit Passed: " & vbTab & vbTab & _
                   IIf(Not IsMissing(vLowerLimit), vLowerLimit, "None") & vbCrLf & _
                   "Upper Limit Passed: " & vbTab & vbTab & _
                   IIf(Not IsMissing(vUpperLimit), vUpperLimit, "None")
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

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