Save Filename+Date+Time?

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
 
C

Chip Pearson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top