If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using Variables in filenames
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 |
#2
|
|||
|
|||
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) "Blinky Bill" Blinky wrote in message ... 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 |
#3
|
|||
|
|||
Thankyou for your help
"Bob Phillips" wrote: 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) "Blinky Bill" Blinky wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Public variables: MSA 2003 | GB via AccessMonster.com | Setting Up & Running Reports | 6 | January 23rd, 2005 10:29 PM |
global variables | Reiner Harmgardt | General Discussion | 3 | January 7th, 2005 03:13 PM |
Pulbisher 2003 not saving sub page filenames | pjr13 | Publisher | 1 | November 24th, 2004 06:43 PM |
My variables keep getting reset... | ~Jenny | General Discussion | 0 | August 23rd, 2004 02:45 PM |
Headings & Outline Styles Share Numbering Scheme | Mark Jerde | Formatting Long Documents | 12 | July 27th, 2004 04:16 PM |