AzureStoneDog
New Member
- Joined
- May 29, 2020
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Good morning. Here is what I currently have as code:
I have folders labelled 01 Jan, 02 Feb and so on until 12 Dec (the number helps keep them in order), so after the 2020\ would be 2020\01 Jan\ for example. I'd like to set this so if the date of the range b1 is within a particular set of dates, it goes to the relevant monthly savepath.
VBA Code:
Dim SavePath As String
Dim SaveAs As String
Dim FileName As String
Dim sDate As String
SavePath = "\\..........\2020\"
FileName = "WC "
sDate = Format(Sheets("Monday").Range("B1"), "dd-mm-yyyy")
SaveAs = SavePath & FileName & sDate & ".xls"
I have folders labelled 01 Jan, 02 Feb and so on until 12 Dec (the number helps keep them in order), so after the 2020\ would be 2020\01 Jan\ for example. I'd like to set this so if the date of the range b1 is within a particular set of dates, it goes to the relevant monthly savepath.