I have a directory that contains archive files. The name of the file are the current_date.ptx. The archive processes a week's worth of data and writes daily files as follows, all dated with a LastModified_Date being the same:
Examples:
File_Names LastModified
05142002.ptx 05/15/2002 11:00:00am
05132002.ptx 05/15/2002 11:00:00am
05122002.ptx 05/15/2002 11:00:00am
etc...
I have written a macro that can go to the specific directory and pull a specific file (hard-coded) then continue on with formatting the file and save it as a flat-file in another directory.
What I want is to be able to logically take the most recent record only compared with today's date. Which I believe should/could be done through the file_name. Possibly converting the file_name into a regular date and comparing it to "Date".
Can this be done in VBA?
Examples:
File_Names LastModified
05142002.ptx 05/15/2002 11:00:00am
05132002.ptx 05/15/2002 11:00:00am
05122002.ptx 05/15/2002 11:00:00am
etc...
I have written a macro that can go to the specific directory and pull a specific file (hard-coded) then continue on with formatting the file and save it as a flat-file in another directory.
What I want is to be able to logically take the most recent record only compared with today's date. Which I believe should/could be done through the file_name. Possibly converting the file_name into a regular date and comparing it to "Date".
Can this be done in VBA?