saving a file with a 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
 
M

Mike H

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

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

Mike
 
P

pat67

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
 

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