Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Formula that displays a Modified Date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
raisorpr - 25 Apr 2008 15:46 GMT
Is there a formula that will display the documents "Modified Date" is a cell?

Thanks,
raisorpr.
Bob Phillips - 25 Apr 2008 16:41 GMT
A UDF

'-----------------------------------------------------------------
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 such as
=DocProps ("last author")
or
=DocProps ("last save time")

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Is there a formula that will display the documents "Modified Date" is a
> cell?
>
> Thanks,
> raisorpr.
raisorpr - 25 Apr 2008 20:48 GMT
I tried coping and pasting this code but didn't work.

Not sure what I did wrong.  I was trying to get the modified date to display
in Cell A1 of Sheet1.

Signature

Thanks,
raisorpr.

> A UDF
>
[quoted text clipped - 20 lines]
> > Thanks,
> > raisorpr.
Gord Dibben - 25 Apr 2008 17:14 GMT
Not "modified date" but you can have last save date/time entered in a cell.

Basically the same thing because a "save" is a modification.

You will need a User Defined Function.

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

Enter in a cell one of the below...............

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

For a list of all built-in Document Proerties, run this macro after copying the
DocProps function to a general module in your workbook.

Paste the macro into the same module.

Sub documentprops()
'list of properties on a new sheet
rw = 1
Worksheets.Add
For Each p In ActiveWorkbook.BuiltinDocumentProperties
   Cells(rw, 1).Value = p.Name
   Cells(rw, 4).Value = "=DocProps(" & "A" & rw & ")"
   rw = rw + 1
Next
End Sub

Gord Dibben  MS Excel MVP

>Is there a formula that will display the documents "Modified Date" is a cell?
>
>Thanks,
>raisorpr.
raisorpr - 25 Apr 2008 20:48 GMT
I tried coping and pasting this code but didn't work.

Not sure what I did wrong.  I was trying to get the modified date to display
in Cell A1 of Sheet1.
Signature

Thanks,
raisorpr.

> Not "modified date" but you can have last save date/time entered in a cell.
>
[quoted text clipped - 42 lines]
> >Thanks,
> >raisorpr.
Gord Dibben - 25 Apr 2008 21:00 GMT
"Didn't work" means what?

Nothing?  Error message?

To where did you copy and paste the code?

Alt + F11 to open the Visual Basic Editor.

CTRL + r to open the Project Explorer.

Right-click on your workbook(project) and  Insert>Module.

Copy/paste the DocProps UDF into that module.

Alt + q to return to the Excel window.

In A1 enter  =DocProps("last save time")

Format as Date

Gord

>I tried coping and pasting this code but didn't work.
>
>Not sure what I did wrong.  I was trying to get the modified date to display
>in Cell A1 of Sheet1.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.