Excel VBA Macro: Save File As Previous Day (to Specific Folder)

Опубликовано: 28 Сентябрь 2024
на канале: greggowaffles
2,674
31

Excel VBA Macro: Save File As Previous Day (to Specific Folder). In this video, we go over how to save the active workbook with the previous date in the file name. We also use other past and future dates in this example.

Code:

Sub save_previous_day()

ActiveWorkbook.SaveAs Filename:="C:\Users\greggowaffles\Documents\Youtube Videos\Test\" & _
"Countries of the World " & Format(Date - 1, "mm-dd-yyyy")

End Sub

Data used in this video:
https://gsociology.icaap.org/datauplo...

#ExcelVBA #ExcelMacro