I want to have a msgbox prompt that has two lines of text, eg:
MsgBox("This is the first line
this is the second line")
I understand that I have to use a carriage return character, but can't seem
to get the syntax right. Can anybody help?
Les.
I want to have a msgbox prompt that has two lines of text, eg:
MsgBox("This is the first line
this is the second line")
I understand that I have to use a carriage return character, but can't seem
to get the syntax right. Can anybody help?
Les.
Les
Msgbox "This is the first line"&Chr(13)&"This is the second"
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS
"LesLdh" <LesLdh@discussions.microsoft.com> wrote in message
news:40FF8787-0CCD-47F4-8ED3-3B5D43EF1D83@microsoft.com...
>I want to have a msgbox prompt that has two lines of text, eg:
>
> MsgBox("This is the first line
> this is the second line")
>
> I understand that I have to use a carriage return character, but can't
> seem
> to get the syntax right. Can anybody help?
>
> Les.
Try this:
MsgBox("This is the first line" & vbCrLf & "this is the second line")
HTH
Alan P.
"LesLdh" <LesLdh@discussions.microsoft.com> wrote in message
news:40FF8787-0CCD-47F4-8ED3-3B5D43EF1D83@microsoft.com...
>I want to have a msgbox prompt that has two lines of text, eg:
>
> MsgBox("This is the first line
> this is the second line")
>
> I understand that I have to use a carriage return character, but can't
> seem
> to get the syntax right. Can anybody help?
>
> Les.
MsgBox "First line" & vbNewLine & "Second line"
--
Vasant
"LesLdh" <LesLdh@discussions.microsoft.com> wrote in message
news:40FF8787-0CCD-47F4-8ED3-3B5D43EF1D83@microsoft.com...
> I want to have a msgbox prompt that has two lines of text, eg:
>
> MsgBox("This is the first line
> this is the second line")
>
> I understand that I have to use a carriage return character, but can't
seem
> to get the syntax right. Can anybody help?
>
> Les.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks