Hi. I have seen several questions along the same lines as my problem but I can't seem to get anything to work for me. I hope someone can help me out.
I have a series of files copied into a unique folder each evening which is named according to the date the files are placed in it. So if the files were copied into a folder on May 7th 2010 the folder name would be 070510 and located off of a variable directory path which I would like to specifiy in a function call. I want to be able to write to this location as well as read files from that location based on the date the most recent folder was created.
An example would be that there are 20 subfolders off of my main directory - which I would pass via a function such as getlastfolder("C:\temp") - which would then return the folder name of the most recently created folder. Suppose the most recent folder was created 8 days ago on 2nd October 2010 then I can then use that string variabe (021010) later to locate certain files I need to write or read from in my other code.
It sounds simple and no doubt it is but I'm going around in circles! I will be using this code within VBA routines in Excel and Access 2007.
Much appreciate any help you can give me with this. I hope 125 points is worthy of the effort required to solve this.