waterballoon
New Member
- Joined
- Jun 15, 2011
- Messages
- 35
I am trying to have a cell in each of my tabs show the last date that each respective tab was modified...is this possible?
Thanks in advance...
Thanks in advance...
[COLOR="Blue"]Private[/COLOR] [COLOR="Blue"]Sub[/COLOR] Worksheet_Change([COLOR="Blue"]ByVal[/COLOR] Target [COLOR="Blue"]As[/COLOR] Range)
Cells(1, 1) = DateValue(Now)
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]Sub[/COLOR]
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Sh.Cells(1, 1) = DateValue(Now)
Application.EnableEvents = True
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Sh.Cells(1, 1) = DateValue(Now)
Application.EnableEvents = True
End Sub
Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Call UpdateCell(Sh)
End Sub
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Call UpdateCell(Sh)
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call UpdateCell(ActiveSheet)
Me.Saved = False
End Sub
Private Sub UpdateCell(ByVal Sh As Worksheet)
If Not Me.Saved Then
Application.EnableEvents = False
Sh.Cells(1, 1) = DateValue(Now)
Me.Saved = True
Application.EnableEvents = True
End If
End Sub