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

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

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/dataupload.html

#ExcelVBA #ExcelMacro

ExcelMacro:Previous

Post a Comment

0 Comments