Save Filename+Date+Time?

  • Thread starter Thread starter Scooby912
  • Start date Start date
S

Scooby912

Is it possible to automatically, with macro or vb, save a currently open
file with the (filename+date+time) to create a new file?

Example:
File1.xls (currently open)
File1mmddyyhhmmss.xls (newly created file)

Thanks,
Erwin
 
Erwin,

Try

ActiveWorkbook.SaveAs _
"FileName" & Format(Now,"mmddyyhhmmss") & ".xls"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Back
Top