Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub Test()
' Run this to test the code
MsgBox "Number of days since worksheet 'Sheet_To_Track' was modified: " & DaysSinceModified, vbInformation + vbOKOnly, "Sheet Modification Info"
End Sub
Sub SaveModifiedDate()
ThisWorkbook.Worksheets("Store_Modify_Date").Range("A1").Value = Date
End Sub
Function DaysSinceModified() As Integer
Dim LastModifiedDate As Date
If IsDate(ThisWorkbook.Worksheets("Store_Modify_Date").Range("A1").Value) Then
LastModifiedDate = ThisWorkbook.Worksheets("Store_Modify_Date").Range("A1").Value
DaysSinceModified = Date - LastModifiedDate
Else
DaysSinceModified = 0
End If
End Function
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
SaveModifiedDate
End Sub