Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Blinky Bill
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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   Report Post  
Blinky Bill
 
Posts: n/a
Default

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINEST maximum number of predictor variables Peter N Excel Worksheet Functions 7 February 17th 05 10:14 AM
Calculating Percentages with Variables tssjhs Excel Worksheet Functions 1 January 28th 05 01:27 AM
Add up a Dynamic Range with 2 Variables John Excel Worksheet Functions 1 January 15th 05 02:23 PM
Two variables Blackcat Excel Discussion (Misc queries) 7 January 7th 05 12:13 PM
Index Match With 3 Variables Scooterdog Excel Worksheet Functions 5 January 2nd 05 07:05 PM


All times are GMT +1. The time now is 04:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"