Consulting

Results 1 to 2 of 2

Thread: Spaces in the subject line when sending a workbook

  1. #1
    VBAX Newbie
    Joined
    Jul 2006
    Posts
    3
    Location

    Spaces in the subject line when sending a workbook

    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

  2. #2
    Remove the quotes with a space and try using:
    [VBA]
    Chr(160)
    [/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •