Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ( ) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ( ) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ( ) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional formatting with a prompt and new email message | Excel Discussion (Misc queries) | |||
Formatting error message | Excel Discussion (Misc queries) | |||
conditional formatting error message | Excel Worksheet Functions | |||
Error message when saving after formatting | Excel Discussion (Misc queries) | |||
Pivot Table not valid error message when formatting data 'button'. | Excel Discussion (Misc queries) |