I have a button assigned to a macro that will name the file with today's date in a specific folder. The folder it looks for is the current year. Everything is working great. Here is the code:
ActiveWorkbook.SaveAs Filename:="C:\Users\john.smith\Desktop\" _
& Format(Now(), "YYYY") & "\" _
& "recd" & Format(Now(), "MMDDYYYY") & ".xlsm"
However, in the current year folder I want to organize it by month and so I have 12 folders. Each folder is by the month and I also put a number for that month as the folder name. Here is an example of how the folder are named within the 2022 folder:
01 January
02 February
03 March
04 April
05 May
06 June
and so........
How do write the VBA so it looks for the month folder that it needs to be saved in? Each year the directory won't change except for the yearly folders that contain these 12 month folders. Thanks for the help.
ActiveWorkbook.SaveAs Filename:="C:\Users\john.smith\Desktop\" _
& Format(Now(), "YYYY") & "\" _
& "recd" & Format(Now(), "MMDDYYYY") & ".xlsm"
However, in the current year folder I want to organize it by month and so I have 12 folders. Each folder is by the month and I also put a number for that month as the folder name. Here is an example of how the folder are named within the 2022 folder:
01 January
02 February
03 March
04 April
05 May
06 June
and so........
How do write the VBA so it looks for the month folder that it needs to be saved in? Each year the directory won't change except for the yearly folders that contain these 12 month folders. Thanks for the help.