Seamus2626
asked on
Save File with date suffix
Below I have some code to save a file in a location -
I would like to add to this code a date suffix
So it will save as France Everything - 16 Dec
Can someone amend
Thanks
Sub SaveTheFile_Everything()
'This code saves the file that has been manipulated with the affix "Manipulated"
'This means, for audit and cross checking purposes, we have the original file and the
'manipulated file
FileYear = Year(Date)
MonthOffset = 0
If Day(Date) = 1 Then MonthOffset = 1
FileMonth = Month(Date) - MonthOffset
FileDate = Format(Date, "mmm yy")
FilePath = "R:\SPM\CAO\FRA\" & FileYear & "\" & FileDate & "\France Everything.xlsx"
ActiveWorkbook.SaveAs Filename:=FilePath
ActiveWorkbook.Close
End Sub
I would like to add to this code a date suffix
So it will save as France Everything - 16 Dec
Can someone amend
Thanks
Sub SaveTheFile_Everything()
'This code saves the file that has been manipulated with the affix "Manipulated"
'This means, for audit and cross checking purposes, we have the original file and the
'manipulated file
FileYear = Year(Date)
MonthOffset = 0
If Day(Date) = 1 Then MonthOffset = 1
FileMonth = Month(Date) - MonthOffset
FileDate = Format(Date, "mmm yy")
FilePath = "R:\SPM\CAO\FRA\" & FileYear & "\" & FileDate & "\France Everything.xlsx"
ActiveWorkbook.SaveAs Filename:=FilePath
ActiveWorkbook.Close
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER