RWayneH
asked on
Adding Time Stamp to File Save
I have been using the following file SaveAs process, but recently found that when saving if someone else has the file open, it fails. How would I add a time stamp to the file save as to prevent this from happening? I have some cases were I was overwritting the previous file with the new current file, but see that is not going to work.
Sub SaveFileToWDrive()
Dim FName As String
'
FName = "W:\Holland\rrw5\Bruce Shortage Report "
FName = FName & Format(Date, "ddmmmyy") & ".xlsx"
'ChDir "W:\Holland\rrw5"
ActiveWorkbook.SaveAs Filename:= _
FName, FileFormat:= _
xlOpenXMLWorkbook, CreateBackup:=False
ActiveWorkbook.Close
MsgBox ("File Saved to " & FName)
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
Thanks for the help -R-
ASKER