+ Reply to Thread
Results 1 to 8 of 8

Incorporating sending email once data dump macro is activated

  1. #1
    Registered User
    Join Date
    05-03-2007
    MS-Off Ver
    2016
    Posts
    37

    Incorporating sending email once data dump macro is activated

    Good day everyone. I've been looking at Ron De Bruin's guide on how to make excel send an email through outlook (https://www.rondebruin.nl/win/s1/outlook/bmail2.htm) but I can't make it work with the current worksheet's macro. My goal here is once the auditor completes the form and clicks "Upload", it will trigger the upload macro and save the data in the Form tab to the Data tab (which works), and I would also like that macro to send first in Outlook the contents of the Form tab before the form gets reset/cleared as part of the upload macro.

    Thanks in advance!

    (please don't mind the excel errors in the Form tab, Upload macro should still work even with those)
    Attached Files Attached Files
    "All your Dakar are belong to Pajero" 11 Dakar Rally wins...7 straight since 2001.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Incorporating sending email once data dump macro is activated

    Not sure if this is what you're attempting, but this code is something I use every day to send out a report (modified for your worksheet)...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-03-2007
    MS-Off Ver
    2016
    Posts
    37

    Re: Incorporating sending email once data dump macro is activated

    hello dangelor - would that be just pasted after the sub(upload) and would work once the upload macro's used?

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Incorporating sending email once data dump macro is activated

    As you stated in your first post, put it just before the form is reset. Looking at your existing code, I'd guess here...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-03-2007
    MS-Off Ver
    2016
    Posts
    37

    Re: Incorporating sending email once data dump macro is activated

    ran into two errors:
    1. duplicate declaration - there was already a <Dim rng As Range> declaration at the top part, so I just removed the 2nd one and it took care of that. however, I then got the error
    2. expected end sub - it stops at "End Function" on the upload part of the macro

    how can that be fixed?
    Attached Images Attached Images

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Incorporating sending email once data dump macro is activated

    Change it back to End Sub

  7. #7
    Registered User
    Join Date
    05-03-2007
    MS-Off Ver
    2016
    Posts
    37

    Re: Incorporating sending email once data dump macro is activated

    problem solved, thank you so much!

  8. #8
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Incorporating sending email once data dump macro is activated

    Good to hear!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-30-2016, 02:13 PM
  2. Macro Help: Sending Email from VBA
    By Gbrown92 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-26-2015, 12:48 PM
  3. Macro sending email from different email address.
    By learningslowly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2014, 03:24 PM
  4. Macro for sending email
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2014, 10:29 AM
  5. automation/macro for sending email to multiple email address
    By saurabhlotankar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2013, 12:13 PM
  6. Sending Email by Macro.
    By dare2join in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2013, 03:09 AM
  7. Macro - sending email
    By Realistic in forum Excel General
    Replies: 1
    Last Post: 02-07-2007, 12:33 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1