View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default "Last Saved" date in Excel 2000

Kevin

What did you do with Bob's code?

You must copy/paste it to a general module in your workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the UDF code in there. Save the
workbook and hit ALT + Q to return to Excel window.

Enter the formula as shown below.

'=DOCPROPS("last author")
'or
'=DOCPROPS("last save time")
'or
'DOCPROPS("creation date")


Gord Dibben MS Excel MVP

On Wed, 20 Sep 2006 09:42:01 -0700, kmwhitt
wrote:

Hi Bob:

Could you elaborate on this a little. I tried pasting =DocProps in one of
my cells and I get a ?NAME error. Please help....

Thanks,

Kevin

"Bob Phillips" wrote:

Chuck,

I just pasted it into 97 and noticed there was an extra hyphen in there that
you don't see in the post (I think this is caused by Google since it
changed). Removing that and it worked.

Try this version

'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

looks the same, but shouldn't have the hyphen.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CLR" wrote in message
...
Hi Bob........this looks cool, and something I could use, but I can't seem

to
make it work in XL97. Is there some adjustment that needs to be made to
accomodate 97?

Tks,
Vaya con Dios,
Chuck, CABGx3



"Bob Phillips" wrote:


'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocument*Properties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


and enter in a cell such as
=DocProps ("last author")
or
=DocProps ("last save time")



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Rachael" wrote in message
...
Is there a way to automatically update a cell in Excel 2000 with the

date
that the file was last saved?

Thanks!