ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save Filename+Date+Time? (https://www.excelbanter.com/excel-programming/272697-save-filename-date-time.html)

Scooby912

Save Filename+Date+Time?
 
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



Chip Pearson

Save Filename+Date+Time?
 
Erwin,

Try

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Scooby912" wrote in message
...
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






All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com