How can you save a spreadsheet with a date stamp.

K

kenny

I need to save a file 2 times the first time for production, the second time
as a backup, I want the backup file to have a date stamp (ex.
gltransfer051506.csv).
i need the date to update each day it run.???
 
C

CLR

This macro may do what you wish, it also adds the TIME......

Sub AddDateToFilename()
Dim Dname As String
Dname = ThisWorkbook.FullName
Dname = Left(Dname, Len(Dname) - 4) & _
Format(Now, "yyyymmdd_hh_mm_ss") & ".xls"
ThisWorkbook.SaveCopyAs Dname
End Sub

Vaya con Dios,
Chuck, CABGx3
 
Top