Using Variables in filenames

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

Guest

I want to automatically name a file created from a particular template.

I want the filename to be todays date.

i.e. I open timesheet.xlt and the file is created as
My Documents\Timesheets\ddmmyyyy.XLS

This template will be distributed to several users.

I am using Excel 2002 SP3
 
ActiveWorkbook.SaveAs Filename:= "C:\MyDocuments\Timesheets\" &
Format(Date,"ddmmyyyy") & ".xls"

although I would suggest you use a format of yyyymmdd, so that it is
ordered.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thankyou for your help

Bob Phillips said:
ActiveWorkbook.SaveAs Filename:= "C:\MyDocuments\Timesheets\" &
Format(Date,"ddmmyyyy") & ".xls"

although I would suggest you use a format of yyyymmdd, so that it is
ordered.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Similar Threads


Back
Top