PDA

View Full Version : Spaces in the subject line when sending a workbook



Tirhana
07-19-2006, 05:43 PM
I have a workbook that needs to go to different departments depending on what the user does. When the user is done filling in the form, they press a button which sends the workbook to whatever department it needs to go to. The subject line needs to contain the company name, the id number, the issue and the date, and I cannot figure how to put spaces between each of the items so the subject line does not look crowded.

This is what I have:
ActiveWorkbook.SendMail Recipients:=department@mycompany.com, Subject:=Range("d30") & " " & Range("d31") & " " & Range("d32") & " " & Now, ReturnReceipt:=False

How do I put a space in between the elements that I need to have in the subject line? I tried (as an experiment) the quotes with a space, but no luck!

Thanks,
Tirhana

ilyaskazi
07-19-2006, 09:01 PM
Remove the quotes with a space and try using:

Chr(160)