A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using Variables in filenames



 
 
Thread Tools Display Modes
  #1  
Old March 9th, 2005, 05:05 AM
Blinky Bill
external usenet poster
 
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  
Old March 9th, 2005, 09:28 AM
Bob Phillips
external usenet poster
 
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  
Old March 11th, 2005, 12:07 AM
Blinky Bill
external usenet poster
 
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


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


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