
Signature
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
If you want a function that can be called from a worksheet cell, use
Function LastSaveTime(R As Range) As Date
Application.Volatile True
With R.Worksheet.Parent
If .FullName <> vbNullString Then
LastSaveTime = CDate(FileDateTime(.FullName))
End If
End With
End Function
Then call this from a cell with the formula
=LastSaveTime(A1)
The cell passed to the function doesn't matter. It is used to select the
workbook whose last save time is to be returned.

Signature
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
> You can use code like
>
[quoted text clipped - 12 lines]
>> last
>> updated?
Dave Peterson - 07 Jan 2008 17:41 GMT
I bet you meant:
If .Path <> vbNullString Then
instead of checking .fullname.
> If you want a function that can be called from a worksheet cell, use
>
[quoted text clipped - 46 lines]
> >> last
> >> updated?

Signature
Dave Peterson
Chris Hughes - 08 Jan 2008 14:21 GMT
Thanks for that.
Sorry, I'm a code newbie -- how do you put the code into excel to make it a
function?
Dave Peterson - 08 Jan 2008 14:56 GMT
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
Then read Chip Pearson's site:
http://cpearson.com/excel/WritingFunctionsInVBA.aspx
> Thanks for that.
>
> Sorry, I'm a code newbie -- how do you put the code into excel to make it a
> function?

Signature
Dave Peterson