Last Date Modified

  • Thread starter Thread starter snickers22
  • Start date Start date
S

snickers22

I need help in setting up a cell to reflect the Last Date Modified of a Word
Document. I did try Google but I don't fully understand the code that they
are saying to use... is there someone who can walk me through how to do this?
 
You can try this UDF which will get you the date and time of any file. If you
are new to UDF set the Security level to low/medium in
(Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11.
From menu 'Insert' a module and paste the below code. Save. Get back to
Workbook.

Function GetFileDateTime(strFile)
GetFileDateTime = FileDateTime(strFile)
End Function

To use this from cell; try this formula
(pass the full path)
=GetFileDateTime("c:\temp.doc")

PS: You will have to recalculate if the file is saved again.

If this post helps click Yes
 
Forgot to mention to format the cell to date/time format of your choice..

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top