Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mike,
If you are concerned about a Mac (or some other platform), vbNewLine is the way to go, because it evaluates to what the system expects . So on Windows it is vbCrLf but (apparently) vbCr on a Mac. But it will be correct on either. NickHK "Mike Woodhouse" wrote in message ups.com... On Nov 14, 4:31 am, "NickHK" wrote: Msg = "Step 1: do this" & vbNewLine & "Step 2: do that" MsgBox Msg NickHK "amacdoc" wrote in ... Can anyone tell me how to get multiple lines in the prompt section of Message boxes? VB help mentions carriage return characters chr(13) but i cant work out how to use them. Currently i have a line of code that says: Msg = Step 1: do this, Step 2: do that i am trying to get step 1 and step 2 on different lines All these seem to work. If you're on a Mac, or remotely concerned about Mac compatibility, it looks like vbNewLine is the way to go... Public Sub MsgBoxes() MsgBox "a" & Chr(13) & "b" MsgBox "a" & Chr(10) & "b" MsgBox "a" & vbCrLf & "b" MsgBox "a" & vbCr & "b" MsgBox "a" & vbLf & "b" MsgBox "a" & vbNewLine & "b" ' Same as vbCrLf on Windows (13+10) but just Chr(13) on Mac End Sub Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding Lines And Boxes, etc. To A Chart ? | Charts and Charting in Excel | |||
In Excel 2007 chart with multiple lines, mouse doesn't track lines | Charts and Charting in Excel | |||
Displaying Multiple values with message boxes | Excel Programming | |||
Message Boxes. | Excel Programming | |||
Multiple lines in a Message box | Excel Programming |