Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
want to record date for each time I update a file - Excel 2007
I want to keep track of dates that a file is updated.
The Summary only shows the last time a file was modified but I want to keep track of each time it is modified. Is there a way to do this? I have MS Office Enterprise 2007. Thanks Patty -- You can always teach an old dog new tricks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
want to record date for each time I update a file - Excel 2007
PattyR wrote:
I want to keep track of dates that a file is updated. The Summary only shows the last time a file was modified but I want to keep track of each time it is modified. Is there a way to do this? I have MS Office Enterprise 2007. Thanks Patty I dug up this code (can't recall where I got the original idea). The functionality here is a save event will silently capture the user and timestamp, and write the aforementioned to a worksheet called "SAVE" (which you must create in the workbook beforehand, and hide if desired). I can upload a workbook that demonstrates this if you like. Watch for line-wrap: THISWORKBOOK.CODE Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim lastrow As Range Static IgnoreSave As Boolean If Not IgnoreSave Then With ThisWorkbook With Worksheets("SAVE") Set lastrow = .Cells(Rows.Count, 1).End(xlUp) _ .Offset(1, 0) lastrow.Value = "Saved By " _ & Environ("UserName") & " " & Now End With IgnoreSave = True .Save IgnoreSave = False End With End If End Sub END CODE<< |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
want to record date for each time I update a file - Excel 2007
PattyR wrote: I want to keep track of dates that a file is updated. The Summary only shows the last time a file was modified but I want to keep track of each time it is modified. Is there a way to do this? I have MS Office Enterprise 2007. Thanks Patty I dug up this code (can't recall where I got the original idea). The functionality here is a save event will silently capture the user and timestamp, and write the aforementioned to a worksheet called "SAVE" (which you must create in the workbook beforehand, and hide if desired). I can upload a workbook that demonstrates this if you like. Watch for line-wrap: THISWORKBOOK.CODE Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim lastrow As Range Static IgnoreSave As Boolean If Not IgnoreSave Then With ThisWorkbook With Worksheets("SAVE") Set lastrow = .Cells(Rows.Count, 1).End(xlUp) _ .Offset(1, 0) lastrow.Value = "Saved By " _ & Environ("UserName") & " " & Now End With IgnoreSave = True .Save IgnoreSave = False End With End If End Sub END CODE<< Hi Could you please tell me where to enter the code? I've never dealth with macros in Excel before. Thanks Patty |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 file/properties to view created date/time how in 2007? | Excel Discussion (Misc queries) | |||
want to record date for each time I update a file | Excel Discussion (Misc queries) | |||
Excel 2007 protected file corrupt after update | Excel Discussion (Misc queries) | |||
How to automatically update the date any time the Excel is openned | Excel Worksheet Functions | |||
How do you continuously update time and date in an Excel cell? | Excel Worksheet Functions |