Save file with different names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good day,

I want to save a workbook for archive purpose, but the name of this new
workbook needs to change everyday. How can I write a macro that would SAVE
my new file AS newbook &"Today()".xls?

I would like to have something like:

ActiveWorkbook.SaveAs Filename:="C:\2007\Newbook & "Today()".xls"
 
ActiveWorkbook.SaveAs Filename:="C:\2007\Newbook " & Format(Date,"yyyymmdd")
& ".xls"

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
I worked this out yesterday after having some problems with the date
format and /


ActiveWorkbook.SaveAs Filename:= _
"C:\2007\Newbook & Format(Date, " dd-mm-yyyy") & ".xls"
 
Ian, better to put the date in year month day order as I showed, helps in
sorting the files in the folder.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Back
Top