I'm trying to run vba code to delete worksheets 2 years from the date they were created. The code I have inputs the date it was created so I would need the 2 years to be from the date in each individual worksheet. Here is the code I have thus far:
Code:
Sub ExportToMasterFileChalk1()
Workbooks("JMPI MANIFEST.xlsm").Sheets("Chalk 1").Copy before:=Workbooks("DO NOT DELETE_MASTER JMPI MANIFEST.xlsm").Sheets(1)
Workbooks("DO NOT DELETE_MASTER JMPI MANIFEST.xlsm").Sheets(1).Name = Format(Date, "DDMMMYYYY") + " Chalk 1"
End Sub