+ Reply to Thread
Results 1 to 9 of 9

send Email to specific person if spread sheet is updated

  1. #1
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    send Email to specific person if spread sheet is updated

    i had made a spread sheet on share folder, so the manager want to see the file when updated by users

    so if user update the workbook saved and closed manager got email through excel tell him that the file was updated without attaching the workbook to him
    just a notification so he can check the file on shared folder
    notification title "File Cinvestigation was updated"
    suppose that manager email is "[email protected]"

    thanks

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: send Email to specific person if spread sheet is updated

    .
    Paste in ThisWorkbook module :

    Please Login or Register  to view this content.


    Paste into a Regular module :

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Logit; 07-22-2019 at 02:00 PM.

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

    Re: send Email to specific person if spread sheet is updated

    Two bits of code...

    Copy this into the ThisWorkbook code module. The value in A1 triggers the email if ... (change as needed)
    Please Login or Register  to view this content.
    Copy this into a standard module (assumes using Outlook)
    Please Login or Register  to view this content.
    Just a bit late... oh well.
    Last edited by dangelor; 07-22-2019 at 12:28 PM.

  4. #4
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    Re: send Email to specific person if spread sheet is updated

    i am not familiar with vba
    so what i need is press alt+f11
    then where i go select the sheet?
    insert module then paste
    Option Explicit

    Sub saveStatus()

    If ActiveWorkbook.Saved = False Then
    Mail_workbook_Outlook
    Else
    'Nothing goes here. Leave blank
    End If

    End Sub


    Sub Mail_workbook_Outlook()


    Dim OutApp As Object
    Dim OutMail As Object
    Dim sndEmail As String
    Dim ccEmail As String
    Dim bccEmail As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next

    With OutMail
    .To = "[email protected]"
    .CC = ""
    .BCC = ""
    .Subject = "File Cinvestigation was updated"
    .Body = "File Cinvestigation was updated"
    .Send
    End With

    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing

    End Sub
    and close?

    can yo explain briefly

    sorry for that

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: send Email to specific person if spread sheet is updated

    .
    See attached file above.

  6. #6
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    Re: send Email to specific person if spread sheet is updated

    thanks for your help
    so what i understand
    on developer tab > visual basic
    then on right vba project vba right click on microsoft excel object

    adding module then paste the code?

    note i am using outlook

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: send Email to specific person if spread sheet is updated

    .
    To create a Regular module (if your project doesn't already have one), click on INSERT in the menu bar,
    then on MODULE.

    On the right side window, you will paste the larger macro as seen in my first post.


    Then, looking back at the smaller pane on the upper right, you should see a list of the worksheets in your workbook as well as a
    module named ThisWorkbook. Double click the "ThisWorkbook". You should see a blank window pane on the right that will initially
    look just like the REGULAR MODULE after you clicked on INSERT.

    If the ThisWorkbook module hasn't already been utilized it will appear blank. If there is code already there don't worry.

    You will paste the smaller macro into the ThisWorkbook module.

    Save the workbook.

    It should function as desired .. as the sample workbook I attached above.

  8. #8
    Registered User
    Join Date
    08-23-2018
    Location
    UAE
    MS-Off Ver
    2019 business
    Posts
    98

    Re: send Email to specific person if spread sheet is updated

    work as a charm
    thanks

    reputation added
    marked as solved
    Last edited by shj92922; 07-22-2019 at 10:11 PM.

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: send Email to specific person if spread sheet is updated

    .
    Thanks for the Rep !

    Glad to help.

+ 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. [SOLVED] Modify email to only send a specific sheet.
    By Throughstream in forum Excel General
    Replies: 14
    Last Post: 10-19-2018, 03:42 AM
  2. Replies: 1
    Last Post: 11-21-2017, 03:29 PM
  3. Macro to Find Missing Value Monthly and Send Email to Responsible Person
    By charpotro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2016, 01:10 PM
  4. Send email once record has been updated
    By jonboy6257 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-08-2014, 03:37 PM
  5. email when expired value is reached and email data to specific person
    By SAM1979 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-23-2011, 09:03 PM
  6. Email a copy of a sheet to a specific person using an email on the worksheet. - VBA
    By j_lad_1999 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2009, 11:38 AM
  7. macro to send excel sheet to specific email address
    By JonnieP in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2005, 06:10 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