ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can excel update date when document last changed? (https://www.excelbanter.com/excel-discussion-misc-queries/101422-can-excel-update-date-when-document-last-changed.html)

Nic

Can excel update date when document last changed?
 
I am trying to figure out how to have a date showing in excel for when
document was last updated. I know you can have date in the footer but that
just shows current date when document is opened. I want date to only change
to current if document has changed.

jetted

Can excel update date when document last changed?
 

Hi Nic

Would this help you out
Sub date_last_modified()
date_modified = ActiveWorkbook.BuiltinDocumentProperties("Last Save
Time")
date_modified = Format(date_modified, "dd/mm/yyyy")
'MsgBox date_modified
'or insert in a cell of your choice
'range("c1").select
'activecell=date_modified
''
'or insert in a center footer
For Each wsheet In Sheets
'the default date format is m/d/yy h:m:s AM/PM
'alternate format is m/d/yy h:mm am/pm
date_modified = Format(date_modified, "dd/mm/yyyy")
wsheet.PageSetup.CenterFooter = "Last Modified: " &
date_modified
Next wsheet

End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=565155



All times are GMT +1. The time now is 05:27 AM.

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