![]() |
Formatting in a Message Box
Is it possible to format within a message box?
I currently have a message box which does nothing more than report the version number of a spreadsheet that the person is using. Code: Sub Version() MsgBox "** You are currently using Version 2.0 of this form ** (Form is validated as New_Supplementary_Form_V6_(Template).xls End Sub (The code all appears on one line @ the moment). What I would like to be able to do is force a a character return in before (Form is....). Is this possible? Many Thanks, Al ( ) |
Formatting in a Message Box
Hi Al
You can use Chr(10) -linefeed- or Chr(13) -carriage return- or vbNewLine (which is a combination of them): Sub test() MsgBox "Hi there" & Chr(13) & "See you in" & Chr(10) & _ "row 3!" & vbNewLine & "That's it." End Sub -- HTH. Best wishes Harald Followup to newsgroup only please "Al Mackay" skrev i melding om... Is it possible to format within a message box? I currently have a message box which does nothing more than report the version number of a spreadsheet that the person is using. Code: Sub Version() MsgBox "** You are currently using Version 2.0 of this form ** (Form is validated as New_Supplementary_Form_V6_(Template).xls End Sub (The code all appears on one line @ the moment). What I would like to be able to do is force a a character return in before (Form is....). Is this possible? Many Thanks, Al ( ) |
Formatting in a Message Box
There are constants for Chr(10) and Chr(13). They are vbLf and vbCr. As well
as vbNewLine, there is also vbCrLf. "Harald Staff" wrote in message ... Hi Al You can use Chr(10) -linefeed- or Chr(13) -carriage return- or vbNewLine (which is a combination of them): Sub test() MsgBox "Hi there" & Chr(13) & "See you in" & Chr(10) & _ "row 3!" & vbNewLine & "That's it." End Sub -- HTH. Best wishes Harald Followup to newsgroup only please "Al Mackay" skrev i melding om... Is it possible to format within a message box? I currently have a message box which does nothing more than report the version number of a spreadsheet that the person is using. Code: Sub Version() MsgBox "** You are currently using Version 2.0 of this form ** (Form is validated as New_Supplementary_Form_V6_(Template).xls End Sub (The code all appears on one line @ the moment). What I would like to be able to do is force a a character return in before (Form is....). Is this possible? Many Thanks, Al ( ) |
All times are GMT +1. The time now is 03:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com