Excel Spreadsheet - Date Modified

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to retrieve the date an excel spreadsheet was modified outside
of Access using code? I want to use it for comparison in a function.
 
Murp,

Try this:

Dim fldr, fl
Dim extfile As String
Dim lstmodif As Date

extfile = "SomePathAndFileName.xls"
Set fldr = CreateObject("Scripting.FileSystemObject")
Set fl = fldr.getfile(extfile)
lstmodif = fl.DateLastModified
Set fl = Nothing
Set fldr = Nothing

HTH,
Nikos
 

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