Results 1 to 7 of 7

Thread: MsgBox

  1. #1
    Join Date
    May 2002
    Posts
    37

    Unanswered: MsgBox

    Anyone know of a way to instert a return line in a msgbox?

    Example:
    MsgBox "Please specifiy a score for Overall Provider Satisfaction (Highest 2 Ratings)."

    I would prefer the msgbox be displayed as:
    Please specifiy a score for
    Overall Provider Satisfaction (Highest 2 Ratings).

    Rather than:
    Please specifiy a score for Overall Provider Satisfaction (Highest 2 Ratings).

  2. #2
    Join Date
    Feb 2002
    Posts
    64
    This'll do the trick:

    MsgBox "Please specifiy a score for " & Chr(13) & " Overall Provider Satisfaction (Highest 2 Ratings)."

  3. #3
    Join Date
    May 2002
    Posts
    37
    Originally posted by TJoy
    This'll do the trick:

    MsgBox "Please specifiy a score for " & Chr(13) & " Overall Provider Satisfaction (Highest 2 Ratings)."
    Thank you! Did not even think about a concatenation with character codes.

  4. #4
    Join Date
    Jan 2002
    Location
    UK
    Posts
    67
    You can also use vbNewLine or vbCrLf, this helps in making the code more readable by the person who is supporting the application.

  5. #5
    Join Date
    Feb 2002
    Posts
    64

    ?

    Not to be argumentative, but what about Chr(13) is hard to read?

  6. #6
    Join Date
    Jan 2002
    Location
    UK
    Posts
    67
    No there is nothing wrong in the chr(13).

    but sometimes while coding I do go in for so many chrs being used,

    eg: Chr(44) for , chr (34) for " and chr(35) for #.

    So many chrs become a problem, also it gives a better look, and more readbility.

    thats it.


  7. #7
    Join Date
    Feb 2002
    Posts
    64
    Gotcha, guess I rarely use Chr().

    Sorry I was being tetchy. I find I get flamed around here sometimes when trying to be helpful...

Posting Permissions

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