#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .HTMLBody

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default .HTMLBody

You can use <br to start a new line

See the Tips here
http://www.rondebruin.nl/mail/tips2.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default .HTMLBody

.htmlBody = Format(Range("E4") - 2, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4") - 1, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4"), "mm/dd") & _
" ECCR (Daily, MTD)"

--
Regards,
Tom Ogilvy


"Greg H." wrote:

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .HTMLBody

Unfortunately this does not work. And when i try what Ron sugested, using
<br i do this:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

And i get this error: "Compile error: Syntax error" and it highlights the &
after the <br. Any ideas?

"Tom Ogilvy" wrote:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4") - 1, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4"), "mm/dd") & _
" ECCR (Daily, MTD)"

--
Regards,
Tom Ogilvy


"Greg H." wrote:

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default .HTMLBody

See this example

<br is between the " "

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
Unfortunately this does not work. And when i try what Ron sugested, using
<br i do this:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

And i get this error: "Compile error: Syntax error" and it highlights the &
after the <br. Any ideas?

"Tom Ogilvy" wrote:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4") - 1, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4"), "mm/dd") & _
" ECCR (Daily, MTD)"

--
Regards,
Tom Ogilvy


"Greg H." wrote:

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .HTMLBody

When i apply the "" i receve the error of : "Compile Error: Syntax Error" and
it highlights E4 in "Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br" & _

"Ron de Bruin" wrote:

See this example

<br is between the " "

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
Unfortunately this does not work. And when i try what Ron sugested, using
<br i do this:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

And i get this error: "Compile error: Syntax error" and it highlights the &
after the <br. Any ideas?

"Tom Ogilvy" wrote:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4") - 1, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4"), "mm/dd") & _
" ECCR (Daily, MTD)"

--
Regards,
Tom Ogilvy


"Greg H." wrote:

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default .HTMLBody

Use it like this

strbody = "<H3<BDear Customer</B</H3" & _
Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)<br" & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)<br" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)<br" & _
"<br<br<BThank you</B"


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
When i apply the "" i receve the error of : "Compile Error: Syntax Error" and
it highlights E4 in "Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br" & _

"Ron de Bruin" wrote:

See this example

<br is between the " "

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
Unfortunately this does not work. And when i try what Ron sugested, using
<br i do this:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

And i get this error: "Compile error: Syntax error" and it highlights the &
after the <br. Any ideas?

"Tom Ogilvy" wrote:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4") - 1, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4"), "mm/dd") & _
" ECCR (Daily, MTD)"

--
Regards,
Tom Ogilvy


"Greg H." wrote:

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .HTMLBody

That was it. Thanks so much. I really appreciate the help and patience.

"Ron de Bruin" wrote:

Use it like this

strbody = "<H3<BDear Customer</B</H3" & _
Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)<br" & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)<br" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)<br" & _
"<br<br<BThank you</B"


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
When i apply the "" i receve the error of : "Compile Error: Syntax Error" and
it highlights E4 in "Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br" & _

"Ron de Bruin" wrote:

See this example

<br is between the " "

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Greg H." wrote in message ...
Unfortunately this does not work. And when i try what Ron sugested, using
<br i do this:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)"
<br & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

And i get this error: "Compile error: Syntax error" and it highlights the &
after the <br. Any ideas?

"Tom Ogilvy" wrote:

.htmlBody = Format(Range("E4") - 2, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4") - 1, "mm/dd") & _
" ECCR (Daily, MTD)" & vbCrLf & _
Format(Range("E4"), "mm/dd") & _
" ECCR (Daily, MTD)"

--
Regards,
Tom Ogilvy


"Greg H." wrote:

Im having problems with the code below displaying the text on one line. E4
is reference to a date i select in the worksheet.

.htmlBody = Format(Range("E4") - 2, "mm/dd") & " ECCR (Daily, MTD)"
& _
Format(Range("E4") - 1, "mm/dd") & " ECCR (Daily, MTD)" & _
Format(Range("E4"), "mm/dd") & " ECCR (Daily, MTD)"

The result should look like this:

08/24 ECCR (Daily, MTD)

08/25 ECCR (Daily, MTD)

08/26 ECCR (Daily, MTD)

Any Ideas?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook htmlbody Erin Excel Programming 3 April 6th 05 07:51 AM


All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"