Hi,
I'm currently trying to create a master list of prices of a product that changes from day to day. In order to do this more efficiently, I want to write a macro that will pull data from the daily workbook (always formatted in the same way eg: 31 Jan 2013.xlsx) that I download to a specific path every morning. Once the data has been pulled, I want the workbook to close and be moved to an archive folder. I have tried various codes that I've found on here for the file opening. I understand that I have to write something that will take Date and search for it in DD MMM YYYY format and loop it while subtracting 1 day from it each time. Here is the code I am using so far for the file opening:
The code above seems to get stuck in the loop and can not open the file. I typically only have one file in the folder (the current day) so I can adjust it to work exclusively for the current day, but I get these prices sometimes on a Sunday and I'll have to do Date - 1 on Monday. Can someone help me fix this one?Please Login or Register to view this content.
Also will need help with how to refer to the opened file once it's been opened as my data pulling macro pulls from over 10 different groups of cells so the code switches the Active workbook back and forth between the master and the daily. Finally the file moving as well to path: C:\Daily Prices\Archived.
Sorry for the long post, I want to make sure I cover all the bases in one post.
Bookmarks