Archive of Mr Excel Message Board


Back to Dates in Excel archive index
Back to archive home

Capturing "Last Modified" date from within a workbook

Posted by Dale Hagopian on May 15, 2001 7:01 AM
Hello again,
would anyone here know how to grab the "Last Modified"
of an opened workbook? I've tried the "GetFileDate"
command, but it wants me to manually point it to a
file. What I would like is a way for an opened
workbook to, in effect, look at itself and return
a "Last Modified" or "Last Created" date.

Any suggestions? Do I need some VB script?
Thanks in advance!!!
-Dale H.


Re: Capturing "Last Modified" date from within a workbook

Posted by cpod on May 15, 2001 9:54 AM

You can add this as a User Defined Function:

Public Function ModDate()
ModDate = Format(FileDateTime(ThisWorkbook.FullName), "m/d/yy h:n ampm")
End Function



Re: Capturing "Last Modified" date from within a workbook

Posted by Dale H. on May 15, 2001 10:12 AM


Wow! Damn! Works like a charm! Thanks a million CPOD!!


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.