Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default vba code runs...need spaces ........

Hello
..Subject = "Credit-Notice " & Range("R14").Value & Range("AR35 ").Value &
Range("AC11").Value & Range("S10 ").Value

The above code is in my subject line in the "Sub Mail_ Active sheet ()"
When the macro runs everything in the subject line of the e mail is one
sentence
example Credit-Notice1234567WaterWorks100.00
I want the subject line to read Credit-Notice, Invoice No 12, Acct No 34567,
Company Water Works , Amount 10.00
Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default vba code runs...need spaces ........

Hi,

Create a constant of ", " and put it between each element of your string

Const gap As String = ", "
Subject = "Credit-Notice" & gap & Range("R14").Value _
& gap & Range("AR35 ").Value & gap & Range("AC11").Value & gap & Range("S10
").Value

Mike

"Wanna Learn" wrote:

Hello
.Subject = "Credit-Notice " & Range("R14").Value & Range("AR35 ").Value &
Range("AC11").Value & Range("S10 ").Value

The above code is in my subject line in the "Sub Mail_ Active sheet ()"
When the macro runs everything in the subject line of the e mail is one
sentence
example Credit-Notice1234567WaterWorks100.00
I want the subject line to read Credit-Notice, Invoice No 12, Acct No 34567,
Company Water Works , Amount 10.00
Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default vba code runs...need spaces ........

..Subject = Join(Array("Credit-Notice", Range("R14").Value, _
Range("AR35").Value, Range("AC11").Value,
Range("S10").Value), " ")


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Wanna Learn" wrote in message
...
Hello
.Subject = "Credit-Notice " & Range("R14").Value & Range("AR35 ").Value &
Range("AC11").Value & Range("S10 ").Value

The above code is in my subject line in the "Sub Mail_ Active sheet ()"
When the macro runs everything in the subject line of the e mail is one
sentence
example Credit-Notice1234567WaterWorks100.00
I want the subject line to read Credit-Notice, Invoice No 12, Acct No
34567,
Company Water Works , Amount 10.00
Thanks in advance



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
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
One macro runs then it auto runs another macro PG Excel Discussion (Misc queries) 2 September 1st 06 09:30 PM
spaces not recognized as spaces windsurferLA Excel Worksheet Functions 9 July 27th 06 11:49 AM
Can you code a macro so it runs multiple times in the same workboo dpmac Excel Discussion (Misc queries) 2 April 18th 06 07:40 PM
Numeric code of spaces! Johan Excel Discussion (Misc queries) 1 March 6th 05 03:49 PM


All times are GMT +1. The time now is 11:43 PM.

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

About Us

"It's about Microsoft Excel"