Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Enter current date automatically in filename

Excel 2000
When saving a file in a Macro, I want to automatically insert the current
date in the file name.

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\John\My Documents\Books(DATE HERE).xls",
FileFormat:=xlNormal _
, CreateBackup:=False

Result: Books01/25/07.xls
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Enter current date automatically in filename

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\John\My Documents\Books" & Format
(Date,"yymmdd") & ".xls", FileFormat:=xlNormal

HTH, CoRrRan

?B?TWVnYWRyb25l?= wrote in
:

Excel 2000
When saving a file in a Macro, I want to automatically insert the
current date in the file name.

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\John\My Documents\Books(DATE
HERE).xls",
FileFormat:=xlNormal _
, CreateBackup:=False

Result: Books01/25/07.xls


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
Need the formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Excel Discussion (Misc queries) 1 January 22nd 07 12:31 PM
set tab or enter keys to automatically move to different cells J9Y Excel Discussion (Misc queries) 8 November 8th 06 02:29 AM
Excel: I enter date and format for date, but shows as number spohar Excel Discussion (Misc queries) 2 March 10th 06 08:40 PM
extract date from the most current date Cali00 Excel Discussion (Misc queries) 1 April 13th 05 02:05 PM
Excel: How do I enter a date in one cell & automatically dates adj Shannon Excel Discussion (Misc queries) 4 January 12th 05 12:51 AM


All times are GMT +1. The time now is 07:05 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"