Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DME
 
Posts: n/a
Default Modified Date

Is there a formula or a way to input the last date a file was modified into
a cell? I have a spreadsheet that many users will be accessing but will not
be able to change. I want them to be able to see the last time the
information was updated. I could manually type in the date, but I know I
may forget sometime, so I want a cell that show the last modified date
automatically. Is this possible or am I crazy?

thanks for your help.


  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

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

DME wrote:
Is there a formula or a way to input the last date a file was
modified into a cell? I have a spreadsheet that many users will be
accessing but will not be able to change. I want them to be able to
see the last time the information was updated. I could manually type
in the date, but I know I may forget sometime, so I want a cell that
show the last modified date automatically. Is this possible or am I
crazy?

thanks for your help.



  #3   Report Post  
 
Posts: n/a
Default

it is possible and your not crazy.
in the workbook before save event put this:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel As Boolean)
Sheets("Sheet1").Range("A1").FormulaR1C1 = Now()
Sheets("sheet1").Range("A2").FormulaR1C1 =
Application.UserName
End Sub

This will tell you the last time the wb was saved and who
did it. use what ever sheet and range you wish.

-----Original Message-----
Is there a formula or a way to input the last date a file

was modified into
a cell? I have a spreadsheet that many users will be

accessing but will not
be able to change. I want them to be able to see the

last time the
information was updated. I could manually type in the

date, but I know I
may forget sometime, so I want a cell that show the last

modified date
automatically. Is this possible or am I crazy?

thanks for your help.


.

  #5   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Why would it throw an error?

The parens are unnecessary, but otherwise it should work with the VBA
Now function.


In article ,
"Frank Kabel" wrote:

this line
Sheets("Sheet1").Range("A1").FormulaR1C1 = Now()

should throw an error. You probably meant:
Sheets("Sheet1").Range("A1").FormulaR1C1 = "=Now()"
though this will update the value with each re-calculation



  #6   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi J.E.
my mistake, thanks for nthe correction!

--
Regards
Frank Kabel
Frankfurt, Germany

JE McGimpsey wrote:
Why would it throw an error?

The parens are unnecessary, but otherwise it should work with the VBA
Now function.


In article ,
"Frank Kabel" wrote:

this line
Sheets("Sheet1").Range("A1").FormulaR1C1 = Now()

should throw an error. You probably meant:
Sheets("Sheet1").Range("A1").FormulaR1C1 = "=Now()"
though this will update the value with each re-calculation



  #7   Report Post  
 
Posts: n/a
Default

hi again
change now() to Date.

-----Original Message-----
it is possible and your not crazy.
in the workbook before save event put this:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As

Boolean,
Cancel As Boolean)
Sheets("Sheet1").Range("A1").FormulaR1C1 = Now()
Sheets("sheet1").Range("A2").FormulaR1C1 =
Application.UserName
End Sub

This will tell you the last time the wb was saved and who
did it. use what ever sheet and range you wish.

-----Original Message-----
Is there a formula or a way to input the last date a

file
was modified into
a cell? I have a spreadsheet that many users will be

accessing but will not
be able to change. I want them to be able to see the

last time the
information was updated. I could manually type in the

date, but I know I
may forget sometime, so I want a cell that show the last

modified date
automatically. Is this possible or am I crazy?

thanks for your help.


.

.

  #8   Report Post  
DME
 
Posts: n/a
Default

OK, I am stupid. I copied and pasted the info you gave me into VBA (I think
that is what I was suppose to do?) and then enter =DOCPROPS in Cell A1. It
gives me a #Name? value. Tell Mr. Idiot here what I did wrong.

Thanks.



"Frank Kabel" wrote in message
...
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

DME wrote:
Is there a formula or a way to input the last date a file was
modified into a cell? I have a spreadsheet that many users will be
accessing but will not be able to change. I want them to be able to
see the last time the information was updated. I could manually type
in the date, but I know I may forget sometime, so I want a cell that
show the last modified date automatically. Is this possible or am I
crazy?

thanks for your help.





  #9   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
for installing this macro

--
Regards
Frank Kabel
Frankfurt, Germany

DME wrote:
OK, I am stupid. I copied and pasted the info you gave me into VBA
(I think that is what I was suppose to do?) and then enter =DOCPROPS
in Cell A1. It gives me a #Name? value. Tell Mr. Idiot here what I
did wrong.

Thanks.



"Frank Kabel" wrote in message
...
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

DME wrote:
Is there a formula or a way to input the last date a file was
modified into a cell? I have a spreadsheet that many users will be
accessing but will not be able to change. I want them to be able to
see the last time the information was updated. I could manually
type in the date, but I know I may forget sometime, so I want a
cell that show the last modified date automatically. Is this
possible or am I crazy?

thanks for your help.



  #10   Report Post  
DME
 
Posts: n/a
Default

I think I will just type it in. I copied and pasted the entrire function
you gave me below into VBA under (this Workbook). It appears to accept it
and recognize it as a function. But when I enter =DOCPROPS I still get the
#name? . What could I possily be doing wrong.

I hate being pest, but I read the website you gave the link to and I still
am unable to master this little task.




"Frank Kabel" wrote in message
...
Hi
see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
for installing this macro

--
Regards
Frank Kabel
Frankfurt, Germany

DME wrote:
OK, I am stupid. I copied and pasted the info you gave me into VBA
(I think that is what I was suppose to do?) and then enter =DOCPROPS
in Cell A1. It gives me a #Name? value. Tell Mr. Idiot here what I
did wrong.

Thanks.



"Frank Kabel" wrote in message
...
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

DME wrote:
Is there a formula or a way to input the last date a file was
modified into a cell? I have a spreadsheet that many users will be
accessing but will not be able to change. I want them to be able to
see the last time the information was updated. I could manually
type in the date, but I know I may forget sometime, so I want a
cell that show the last modified date automatically. Is this
possible or am I crazy?

thanks for your help.







  #11   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
this is the wrong place. Create a new module in this project and insert the
code there (as described in the link I provided...)

--
Regards
Frank Kabel
Frankfurt, Germany

DME wrote:
I think I will just type it in. I copied and pasted the entrire
function you gave me below into VBA under (this Workbook). It
appears to accept it and recognize it as a function. But when I
enter =DOCPROPS I still get the #name? . What could I possily be
doing wrong.

I hate being pest, but I read the website you gave the link to and I
still am unable to master this little task.




"Frank Kabel" wrote in message
...
Hi
see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
for installing this macro

--
Regards
Frank Kabel
Frankfurt, Germany

DME wrote:
OK, I am stupid. I copied and pasted the info you gave me into VBA
(I think that is what I was suppose to do?) and then enter =DOCPROPS
in Cell A1. It gives me a #Name? value. Tell Mr. Idiot here what I
did wrong.

Thanks.



"Frank Kabel" wrote in message
...
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

DME wrote:
Is there a formula or a way to input the last date a file was
modified into a cell? I have a spreadsheet that many users will
be accessing but will not be able to change. I want them to be
able to see the last time the information was updated. I could
manually type in the date, but I know I may forget sometime, so I
want a cell that show the last modified date automatically. Is
this possible or am I crazy?

thanks for your help.



  #12   Report Post  
DME
 
Posts: n/a
Default

Frank,

Thanks for all your help. It WORKED! I can't tell you how many times I
come here and I read the help you provide to myself and the many other users
that just need a little guidance. Your patience and knowledge are very
valuable to us all.

Thanks Again!





"Frank Kabel" wrote in message
...
Hi
this is the wrong place. Create a new module in this project and insert

the
code there (as described in the link I provided...)

--
Regards
Frank Kabel
Frankfurt, Germany

DME wrote:
I think I will just type it in. I copied and pasted the entrire
function you gave me below into VBA under (this Workbook). It
appears to accept it and recognize it as a function. But when I
enter =DOCPROPS I still get the #name? . What could I possily be
doing wrong.

I hate being pest, but I read the website you gave the link to and I
still am unable to master this little task.




"Frank Kabel" wrote in message
...
Hi
see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
for installing this macro

--
Regards
Frank Kabel
Frankfurt, Germany

DME wrote:
OK, I am stupid. I copied and pasted the info you gave me into VBA
(I think that is what I was suppose to do?) and then enter =DOCPROPS
in Cell A1. It gives me a #Name? value. Tell Mr. Idiot here what I
did wrong.

Thanks.



"Frank Kabel" wrote in message
...
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

DME wrote:
Is there a formula or a way to input the last date a file was
modified into a cell? I have a spreadsheet that many users will
be accessing but will not be able to change. I want them to be
able to see the last time the information was updated. I could
manually type in the date, but I know I may forget sometime, so I
want a cell that show the last modified date automatically. Is
this possible or am I crazy?

thanks for your help.





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
Modified Date D Excel Discussion (Misc queries) 12 February 12th 07 01:39 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM
Date issue between Windows and Macintosh version dlg1967 Excel Discussion (Misc queries) 4 January 19th 05 03:51 PM
Date formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 16th 04 12:41 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


All times are GMT +1. The time now is 05:28 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"