Hi there. I've written a bit of code that goes to a certain website, downloads monthly data files, and saves them in a directory that I have created, with names such as "domestic_report2014-Sep-BC". The monthly files' data is laid out horizontally, with Column A showing province, B showing time period (as MMM-YY, e.g. Sep-13), and columns C-L showing various sales data.
What I'm trying to figure out now is how to write VBA coding that will go into the directory I created, and open the file that contains the date information in the file name that corresponds with the actual month/year (i.e. to pull the current month's data file). I am able to get the last date modified file open no problem with the below script. However, if I ever need to go look at older data files, this then makes an older file the latest date modified file, which is not good for my purposes, since I am ultimately appending each new file to a master excel sheet.
By the way, this is my first post on Excel Forum! Any help at all is much appreciated
HGD
My current code:
Bookmarks