Home All Groups Group Topic Archive Search About

add new line in messagebox text - not using VbCrLf - how?

Author
13 Nov 2006 5:38 PM
Rich
Is it possible to add a new line to the text for a message box like html

"this is msg1 <br> this is msg2"

versus
"this is msg1" & VbCrLf & "this is msg2?

Or like C#
"this is msg1 \n this is msg2"

Thanks,
Rich

Author
13 Nov 2006 5:46 PM
Spam Catcher
=?Utf-8?B?UmljaA==?= <R***@discussions.microsoft.com> wrote in
news:E2FF3993-0034-4F3A-A44F-FEDBB7388052@microsoft.com:

> Is it possible to add a new line to the text for a message box like html
>
> "this is msg1 <br> this is msg2"

You'll need to replace <br> with the carriage return and line feed
characters.

i.e. Replace(myString, "<br>", vbcrlf)
Author
13 Nov 2006 8:01 PM
Herfried K. Wagner [MVP]
"Rich" <R***@discussions.microsoft.com> schrieb:
> versus
> "this is msg1" & VbCrLf & "this is msg2?
>
> Or like C#
> "this is msg1 \n this is msg2"

In both cases similar string literals will be emitted, except that 'vbCrLf'
corresponds to "\r\n" in C#.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>