![]() |
display last date document saved
How can I have a cell display the last date and time the sheet was saved?
|
display last date document saved
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? |
All times are GMT +1. The time now is 07:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com