I'm running a macro on an excel template that does a "save as" on open and I would like it to save to a certain location. However, depending on what year it is, it will save to a different folder. In the location where I want to save it, there are folders named after the year, ie, "2004", "2005", "2006", etc...
I set up a variable called FName, whick defines the location I want it to save to, and then set it equal to
After the second folder, I would like it to check the date, and if it is 2005, I would then like it to go from the second folder, to the folder named 2005, or if is 2006, then to that folder.
Can I set up a variable that is equal to the current year in the 4-digit format, and then call that variable in the folder location?
Any help would be appreciated.
Thanks,
Nate
I set up a variable called FName, whick defines the location I want it to save to, and then set it equal to
Code:
FName = "U:\First Folder\Second Folder\" & ActiveWorkbook.Name
After the second folder, I would like it to check the date, and if it is 2005, I would then like it to go from the second folder, to the folder named 2005, or if is 2006, then to that folder.
Can I set up a variable that is equal to the current year in the 4-digit format, and then call that variable in the folder location?
Any help would be appreciated.
Thanks,
Nate