How do I check the excel file modified date before import it?

  • Thread starter Thread starter debora
  • Start date Start date
D

debora

Guest
I would like to create a routine to import excel files into a table. My question is, how do I check for the excel file date before I import it. I mean, in my routine I would like to import the excel file just if the excel file modified date is equal to "today" if not display a error message. Hint, I am not an advanced programmer just an user ... thanks
 
Excel

You could create a spreadsheet in your Excel Workbook that uses a filter such that the modified date is only =Date. That way only the data you are interested in comes into Access.

Then use the DoCmd.TransferSpreadsheet in Access to import that filtered page.
 
Hello,

Code:
modDate= FileDateTime([I]Your Filename inc path[/I])

This should do the trick.

Take care.
 

Users who are viewing this thread

Back
Top Bottom