Display last saved date for each sheet in workbook

chrisMW

New Member
Joined
Jun 4, 2008
Messages
2
Is there a way to capture the "last saved" date for each tab in a workbook?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,547
The workbook is saved, and all it's contents, in one go. So, your question doesn't make sense. What about if you kept track of the last updated date for each tab? You could use the Worksheet_Change event to log that somewhere for you.
 

chrisMW

New Member
Joined
Jun 4, 2008
Messages
2
Thanks, that's helpful....and that is exactly what I'm trying to do: log when changes are made to each respective tab.

The tabs contain site data (each site has their own tab). Updated info/activity comes through regulary, but not at a specific date or time. I'm trying to find a way to track updates because right now the only way we can tell if a site hasn't been sending in their updates is to manually go through and check. There are over a 100 sites, so it's not easy.

I'm an amateur VBE user. Do I use use the event in as a procedure or in a module?

Thanks for your tip.
 

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,547
Insert a sheet named Log, and put "Sheet Name" in cell A1, and "Date changed" in cell B1.

In the VBE, in the Project Explorer window, double click the ThisWorkBook object, which will activate the code window for that object, and insert this:
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Dim blFound As Boolean
    Application.EnableEvents = False
    blFound = False
    For Each r In Sheets("Log").UsedRange.Rows
        If r.Cells(1, 1) = Sh.Name And r.Cells(1, 2) = Int(Now) Then
            ' already logged today
            blFound = True
            Exit For
        End If
    Next
    If Not blFound Then
        Sheets("Log").Range("A65536").End(xlUp).Offset(1, 0).Value = Sh.Name
        Sheets("Log").Range("A65536").End(xlUp).Offset(0, 1).Value = Int(Now)
    End If
    Application.EnableEvents = True
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,132,668
Messages
5,654,641
Members
418,146
Latest member
Shnn028

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top