saving a file with a date

  • Thread starter Thread starter pat67
  • Start date Start date
P

pat67

Hi. I am looking how to save a file with a date in it from code. In
other words I have a macro that I use and at the end I want to save
the file "workbook 1" as "workbook 1 10-07-2009" with 10-07-2009
representing whatever date I am saving it on. I cannot find that
information in the help file. Can someone enlighte me please?

Thanks
 
Hi,
This creates the filename string and holds is in a variable called fnam

fnam = "Workbook 1 " & Format(Date, "mm-dd-yyyy")

Mike
 
Hi,
This creates the filename string and holds is in a variable called fnam

fnam = "Workbook 1 " & Format(Date, "mm-dd-yyyy")

Mike






- Show quoted text -

Great. Thanks
 
Back
Top