ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   body of mail and sheet. (https://www.excelbanter.com/excel-programming/347602-body-mail-sheet.html)

Mike

body of mail and sheet.
 
hi

i have constructed a macro which copies cells from an input sheet to a
summary sheet which is then emailed as the body of a message to a specific
person.
However....
i would like to include a short block of text above the table, and am having
problems with putting it on new lines.
i have used "text" & Chr(13) &"text" - - this didnt work
i have used "text" & vbnewline & " text - - this didnt work.

any suggestions?
thanks
mike

Roger Govier[_10_]

body of mail and sheet.
 
Hi Mike

Try Chr(10)

Sub testmess()
MsgBox ("this is one line" & Chr(10) & "this is another line")
End Sub

worked fine for me
Regards

Roger Govier


mike wrote:
hi

i have constructed a macro which copies cells from an input sheet to a
summary sheet which is then emailed as the body of a message to a specific
person.
However....
i would like to include a short block of text above the table, and am having
problems with putting it on new lines.
i have used "text" & Chr(13) &"text" - - this didnt work
i have used "text" & vbnewline & " text - - this didnt work.

any suggestions?
thanks
mike


Mike

body of mail and sheet.
 
No luck.
Any ideas?

Mike

"Roger Govier" wrote:

Hi Mike

Try Chr(10)

Sub testmess()
MsgBox ("this is one line" & Chr(10) & "this is another line")
End Sub

worked fine for me
Regards

Roger Govier


mike wrote:
hi

i have constructed a macro which copies cells from an input sheet to a
summary sheet which is then emailed as the body of a message to a specific
person.
However....
i would like to include a short block of text above the table, and am having
problems with putting it on new lines.
i have used "text" & Chr(13) &"text" - - this didnt work
i have used "text" & vbnewline & " text - - this didnt work.

any suggestions?
thanks
mike




All times are GMT +1. The time now is 03:10 PM.

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