Message box - overwrite file
Posted on 2014-12-16
My below sub saves a file
If the file is already there I want a Yes/No message box saying "File already exist, overwrite"
If yes, overwrite, if no exit sub
'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
SuffixDate = Format(Date, "dd mmm")
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 BB - " & SuffixDate & ".xlsx"