Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
chris w
 
Posts: n/a
Default ? on "date last saved" in cell

I have seen the following from Frank posted a few times and I have yet to
make this work, what am I doing wrong? I have pasted the function in and
only recieve
#NAME?
in the cell.

Thank you,
chris

Hi
use the following UDF (only on workbook level):

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

and enter in a cell
=DOCPROPS("last save time")
(format cell as date)

--
Regards
Frank Kabel
Frankfurt, Germany

"Glenn" schrieb im Newsbeitrag
...
I have a workbook with a cell that I want to update with
the "Date Last Saved". I tried using the function NOW()
but that updates the cell when the workbook is opened or
saved. Can anyone assist? Thanks.


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Chris,

This is a custom UDF, so you need to place the code in a normal code module.
The #NAME suggest that it cannot find the UDF. If you passed an invalid
property it would give a #VALUE error.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"chris w" wrote in message
...
I have seen the following from Frank posted a few times and I have yet to
make this work, what am I doing wrong? I have pasted the function in and
only recieve
#NAME?
in the cell.

Thank you,
chris

Hi
use the following UDF (only on workbook level):

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

and enter in a cell
=DOCPROPS("last save time")
(format cell as date)

--
Regards
Frank Kabel
Frankfurt, Germany

"Glenn" schrieb im Newsbeitrag
...
I have a workbook with a cell that I want to update with
the "Date Last Saved". I tried using the function NOW()
but that updates the cell when the workbook is opened or
saved. Can anyone assist? Thanks.




  #3   Report Post  
chris w
 
Posts: n/a
Default

OK, I was pasting it into a workbook code instead of inserting a new module,
thanx I have never done that.

Chris



"Bob Phillips" wrote:

Chris,

This is a custom UDF, so you need to place the code in a normal code module.
The #NAME suggest that it cannot find the UDF. If you passed an invalid
property it would give a #VALUE error.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"chris w" wrote in message
...
I have seen the following from Frank posted a few times and I have yet to
make this work, what am I doing wrong? I have pasted the function in and
only recieve
#NAME?
in the cell.

Thank you,
chris

Hi
use the following UDF (only on workbook level):

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

and enter in a cell
=DOCPROPS("last save time")
(format cell as date)

--
Regards
Frank Kabel
Frankfurt, Germany

"Glenn" schrieb im Newsbeitrag
...
I have a workbook with a cell that I want to update with
the "Date Last Saved". I tried using the function NOW()
but that updates the cell when the workbook is opened or
saved. Can anyone assist? Thanks.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting the date that an excel sheet is saved into a cell sharock Excel Discussion (Misc queries) 2 January 6th 05 07:07 PM
Last saved date into an excel cell Steve J. Vaughan Excel Worksheet Functions 2 December 13th 04 11:17 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
store file saved date in cell Martin Connelly Excel Worksheet Functions 1 November 16th 04 01:32 PM


All times are GMT +1. The time now is 07:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"