Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Save or open file as YYYYMMDD in Macros, how to record it

In Macros, I would like to save or open file name as YYYYMMDD or pickup name
from a cell where date is mentioned as =today() with format as YYYYMMDD. or
any other alternative to pick up the file with naming convention as mentioned
above.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Save or open file as YYYYMMDD in Macros, how to record it

Activeworkbook.saveas filename:=format(date,"yyyymmdd") & ".xls", _
fileformat:=xlworkbooknormal

Is one way to save a workbook with today's date. I didn't give it a folder
location--so it'll save to the current folder (whatever that might be!).

dim wkbk as workbook
set wkbk = workbooks.open(filename:=format(date,"yyyymmdd") & ".xls")

would be a way to open a workbook in the current folder that has today's date as
the name.

Vijay Kotian wrote:

In Macros, I would like to save or open file name as YYYYMMDD or pickup name
from a cell where date is mentioned as =today() with format as YYYYMMDD. or
any other alternative to pick up the file with naming convention as mentioned
above.


--

Dave Peterson
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
Can not open excel file xls. extensions cjshazen Excel Discussion (Misc queries) 1 February 14th 06 01:17 AM
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
Can't open a file and save under a different name scrappy Excel Discussion (Misc queries) 1 July 13th 05 01:44 AM
Sumif Linking to Another Workbook error #VALUE! Tunde Excel Discussion (Misc queries) 16 March 4th 05 03:02 AM
save excel file from a table delimited file (.txt) using macros sedamfo New Users to Excel 1 February 15th 05 04:19 AM


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