Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
How can I have a cell display the last date and time the sheet was saved?
|
#2
![]() |
|||
|
|||
![]()
You can attach a macro to enter the date/time when the workbook is saved.
From the menu bar, Tools Macro Visual Basic Editor. Then View Project Explorer to bring up the project window, probably on the top-left of your screen. DOuble-click on the Excel icon labeled 'This Workbook'. Then in the code window, use the first drop-down to select Workbook, and the second to select BeforeSave. VBA will create the subroutine template; you just need to fill in the body. The sub should look like: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Worksheets("Sheet1").Activate Range("A1") = Now() End Sub You can change 'Sheet1' and 'A1' to suit your needs. Note that this won't work unless macros are enabled (which in turn requires that security -- Tools Macros Security -- is not set to high). HTH. --Bruce "Skyvalley" wrote: How can I have a cell display the last date and time the sheet was saved? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I display the 'Date Modified' in an Excel worksheet header | Excel Discussion (Misc queries) | |||
Update a formula based on date worksheet was saved | Excel Worksheet Functions | |||
search for latest date | Excel Worksheet Functions | |||
Dates are saved with a future date | New Users to Excel | |||
ERROR MESSAGE DOCUMENT NOT SAVED | Excel Discussion (Misc queries) |