jevi
Active Member
- Joined
- Apr 13, 2010
- Messages
- 339
- Office Version
- 2016
- Platform
- Windows
Hi all,
I tried to combine a macro from the different help that I got on this website but I am not doing well.
I have this file Dati.csv and I need to do a copy of it (as it is a daily file) and save it as the condition below.
Don't know what I am doing wrong.
Thank you,
I tried to combine a macro from the different help that I got on this website but I am not doing well.
I have this file Dati.csv and I need to do a copy of it (as it is a daily file) and save it as the condition below.
Don't know what I am doing wrong.
Thank you,
VBA Code:
Sub Workbook()
Dim WorkbookName
Windows("Dati.csv").Activate
ActiveWorkbook.SaveAs
If Weekday(Date) = vbMonday Then
ActiveWorkbook("Dati.csv (2)").Name = Format(Date - 3, "dd.mm.yyyy")
Else
ActiveWorkbook("Dati.csv (2)").Name = Format(Date - 1, "dd.mm.yyyy")
End If
Windows("Dati.csv ").Activate
ActiveWindow.Close
End Sub