ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New Line in MsgBox (https://www.excelbanter.com/excel-programming/306280-new-line-msgbox.html)

Exceller

New Line in MsgBox
 
Anyone know how to start a new line in a MsgBox. For example, if I want to
have paragraphs in a Msgbox how do I do so?

Frank Kabel

New Line in MsgBox
 
Hi
try
msgbox "text1" & vblf & "text2" & vblf & "text3"

--
Regards
Frank Kabel
Frankfurt, Germany


exceller wrote:
Anyone know how to start a new line in a MsgBox. For example, if I
want to have paragraphs in a Msgbox how do I do so?


cmart02[_2_]

New Line in MsgBox
 
Simply use VbCr to break your lines. Eg:

MsgBox "Hello" & vbcr & "How are you?"

JE McGimpsey

New Line in MsgBox
 
Rather than tie this to one platform or another, I'd recommend

vbNewLine

instead of

vbLF

since it works the same on both WinXL and MacXL.

In article ,
"Frank Kabel" wrote:

try
msgbox "text1" & vblf & "text2" & vblf & "text3"


Frank Kabel

New Line in MsgBox
 
Hi JE
thanks for the info (as I unfortunately had never used a MAC before
never would have noticed this)

--
Regards
Frank Kabel
Frankfurt, Germany


JE McGimpsey wrote:
Rather than tie this to one platform or another, I'd recommend

vbNewLine

instead of

vbLF

since it works the same on both WinXL and MacXL.

In article ,
"Frank Kabel" wrote:

try
msgbox "text1" & vblf & "text2" & vblf & "text3"




All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com