Results 1 to 27 of 27

Send me an Email if someone has made a change to my file.

Threaded View

wherdzik Send me an Email if someone... 04-06-2021, 11:33 AM
Logit Re: Send me an Email if... 04-06-2021, 01:22 PM
wherdzik Re: Send me an Email if... 04-07-2021, 12:57 PM
Logit Re: Send me an Email if... 04-07-2021, 01:06 PM
wherdzik Re: Send me an Email if... 04-09-2021, 07:58 AM
Logit Re: Send me an Email if... 04-09-2021, 09:43 AM
wherdzik Re: Send me an Email if... 04-09-2021, 03:01 PM
Logit Re: Send me an Email if... 04-09-2021, 04:57 PM
hrlngrv Re: Send me an Email if... 04-09-2021, 05:12 PM
macropod Re: Send me an Email if... 04-09-2021, 11:28 PM
hrlngrv Re: Send me an Email if... 04-10-2021, 07:26 PM
Logit Re: Send me an Email if... 04-09-2021, 10:41 PM
wherdzik Re: Send me an Email if... 04-10-2021, 08:55 AM
Logit Re: Send me an Email if... 04-10-2021, 10:17 AM
wherdzik Re: Send me an Email if... 04-10-2021, 02:23 PM
Logit Re: Send me an Email if... 04-10-2021, 02:39 PM
Logit Re: Send me an Email if... 04-10-2021, 07:29 PM
Croweater Re: Send me an Email if... 04-10-2021, 08:52 PM
macropod Re: Send me an Email if... 04-11-2021, 02:16 AM
Croweater Re: Send me an Email if... 04-11-2021, 02:57 AM
macropod Re: Send me an Email if... 04-11-2021, 03:00 AM
Croweater Re: Send me an Email if... 04-11-2021, 03:52 AM
macropod Re: Send me an Email if... 04-11-2021, 03:54 AM
AliGW Re: Send me an Email if... 04-11-2021, 04:01 AM
Croweater Re: Send me an Email if... 04-11-2021, 04:06 AM
AliGW Re: Send me an Email if... 04-11-2021, 04:08 AM
ubludkisranye Re: Send me an Email if... 04-11-2021, 06:59 AM
  1. #1
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    548

    Send me an Email if someone has made a change to my file.

    I have a very sensitive file that I would like it to send me an email if someone has opened it or has has made a change to it. Is this possible? and if it is, is it a resource killer?
    I found this code online, can it be modified for workbook?

    Private Sub Worksheet_Change(ByVal Target As Range)
    'Updated by Extendoffice 2017/9/12
        Dim xRgSel As Range
        Dim xOutApp As Object
        Dim xMailItem As Object
        Dim xMailBody As String
        On Error Resume Next
        Application.ScreenUpdating = False
        Application.DisplayAlerts = False
        Set xRg = Range("A2:E11")
        Set xRgSel = Intersect(Target, xRg)
        ActiveWorkbook.Save
        If Not xRgSel Is Nothing Then
            Set xOutApp = CreateObject("Outlook.Application")
            Set xMailItem = xOutApp.CreateItem(0)
            xMailBody = "Cell(s) " & xRgSel.Address(False, False) & _
                " in the worksheet '" & Me.Name & "' were modified on " & _
                Format$(Now, "mm/dd/yyyy") & " at " & Format$(Now, "hh:mm:ss") & _
                " by " & Environ$("username") & "."
     
            With xMailItem
                .To = "Email Address"
                .Subject = "Worksheet modified in " & ThisWorkbook.FullName
                .Body = xMailBody
                .Attachments.Add (ThisWorkbook.FullName)
                .Display
            End With
            Set xRgSel = Nothing
            Set xOutApp = Nothing
            Set xMailItem = Nothing
        End If
        Application.DisplayAlerts = True
        Application.ScreenUpdating = True
    End Sub
    Last edited by wherdzik; 04-06-2021 at 11:37 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Send row data in an email on cell change
    By fenfool in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2015, 11:43 AM
  2. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  3. send email of changes made in excel sheet
    By ptkhisti in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2014, 03:46 PM
  4. Replies: 2
    Last Post: 02-14-2014, 12:03 AM
  5. change event macro to evaluate windows user who initiated the change then send email
    By pmanoloff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2012, 03:31 PM
  6. Replies: 0
    Last Post: 05-20-2011, 08:55 AM
  7. [SOLVED] I want a mesage sent when a change is made to an excel file
    By charlieking4747 in forum Excel General
    Replies: 1
    Last Post: 01-13-2006, 03:30 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