Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Need code to email workbook (2003)

    Hi,

    I have a colleague that has a workbook filled with a number of sheets containing fill-in forms. He will email this to a recipient and that person will fill out the forms. Once the forms are filled, my colleague wants the recipient to click a worksheet button at the bottom of the page that will email the saved workbook back to him.

    I have no idea how to even start. Can I ask for some assistence from the Excel experts to help with some code that I can attach to the button I will add to this forms workbook.

    Let me know if you need more details.

    Many thanks
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need code to email workbook (2003)

    Create a macro like this in the workbook:

    Sub MailMe()
    ActiveWorkbook.SendMail "someone@somecompany.com", "Filled in form"
    End Sub

    Switch back to Excel.
    Activate the Forms toolbar.
    Place a command button from this toolbar on the worksheet.
    Excel will prompt you to assign a macro; select MailMe.

    Note: this will obviously only work if the recpient enables macros in the workbook.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Need code to email workbook (2003)

    Wow...it works great. TX

    (Now that I know what the code looks like...it was easy!) Sendmail...hmmm, who would guess!

    Cheers
    Regards,
    Rudi

Posting Permissions

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