Discussion Locked

Get LastModified date

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
A tip from TechRepublic on how to get the full Path and Filename into an excel footer has been very helpful to me. Now I have tried to find a way to get the date last modified into footer or even into a cell and cannot find a way. Has anyone done that?

6 replies

by sgt_shultz

well, you can have this macro run at startup of the worksheet, does this help?
(pasted from mskb article found searching using 'excel' and modified date')
it sure seems weird that that is the only way...
-------------------------------
The following macro code places the current date in the footer in the "mmmm d yyyy" format.
Public Sub sampledate()
ActiveSheet.PageSetup.LeftFooter = Format(Now, "mmmm d yyyy")
End Sub

by dklippert

You could use this:
To put the date in a cell use =SavedDate

Function SavedDate() As Date
SavedDate = FileDateTime(ThisWorkbook.FullName)
End Function

Sub Auto_Open()
ActiveSheet.PageSetup.LeftFooter = SavedDate
End Sub

This discussion is closed to new replies.