Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open file with variable date name based on current date
Hello,
I have a folder containing different .xls report files with the name format "YYYY MM text.xls", where YYYY stands for year, MM for month. I need a macro which, when run from an excel file saved in a different loacation, based on the current date, e.g. January 7, 2009, will open the file "2009 01 text.xls". Thanks for your help, Ciperian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open file with variable date name based on current date
Workbooks.Open "C:\Foldername\" & Format(Now(),"yyyy mm") & " text.xls"
Except it will open 2010 01 text.xls ;-) HTH, Bernie MS Excel MVP "Ciprian" wrote in message ... Hello, I have a folder containing different .xls report files with the name format "YYYY MM text.xls", where YYYY stands for year, MM for month. I need a macro which, when run from an excel file saved in a different loacation, based on the current date, e.g. January 7, 2009, will open the file "2009 01 text.xls". Thanks for your help, Ciperian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open text file based on date. | Excel Programming | |||
to-date total based on current date | Excel Worksheet Functions | |||
get back to day one based on current date | Excel Worksheet Functions | |||
Open file based on yesterday's date | Excel Programming | |||
Rename file based on current date | Excel Programming |