ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Display last date workbook was modified? (https://www.excelbanter.com/excel-discussion-misc-queries/100365-display-last-date-workbook-modified.html)

manxman

Display last date workbook was modified?
 
I would like to have a cell display the last date a workbook was modified.
What would the code for that be?

Thanks in advance for any help.


mrice

Display last date workbook was modified?
 

You could use a Worksheet_change or Workbook_beforesave macro to
populate a cell with the current date/time.

e.g.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheets(1).Cells(1, 1) = Date
End Sub

pasted into the thiswokbook tab in the VBA editor (Shift F11)


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=563356



All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com