Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default save a file with current date inserted automatically

I want to create macro in spreadsheet that will save the file to a specified
location using a specified name followed by the current date. Catch is I
want the current date to be inserted automatically. How is this done? may
not be able to access at work so if not a prob. post answer to
thanx in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default save a file with current date inserted automatically

Try this:

ActiveWorkbook.SaveAs FileName:= _
ActiveWorkbook.Name & "_" & DatePart("yyyy", Date) & DatePart("m", Date) &
DatePart("d", Date)

Then depending on whether you want to save as .csv or .xls, etc. you can add

FileFormat:=xlNormal
or
FileFormat:=xlCSV

and other options. You'll have to play with whether or not you need to add
the extension (like & ".xls" after the DatePart.

HTH
--
--Being powerful is like being a lady; if you have to tell people you are,
you aren''t. ~~Margaret Thatcher


"Budster" wrote:

I want to create macro in spreadsheet that will save the file to a specified
location using a specified name followed by the current date. Catch is I
want the current date to be inserted automatically. How is this done? may
not be able to access at work so if not a prob. post answer to
thanx in advance

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
How do I save a picture that someone inserted into an Excel file? FLC Excel Discussion (Misc queries) 4 June 5th 08 06:36 PM
Excel automatically updates inserted date Jo Excel Worksheet Functions 3 January 9th 08 11:26 PM
Automatically have the date or time inserted into a cell Chris Excel Discussion (Misc queries) 7 January 8th 07 05:51 PM
Save File with the current date and time. sd Excel Programming 2 December 2nd 05 12:33 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM


All times are GMT +1. The time now is 12:39 AM.

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

About Us

"It's about Microsoft Excel"