Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a code that I would like the code to look for the format of the file
path and the file name plus one month. So that today (April) it would be looking for the file with name May. Example: "G:\CC folder\Accounts\grape juice\LA Sheets\Concord " & Format(Date, "mmm-yyyy") & ".xls" Thanks for any help in advance! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim PathName as String
Dim NewDate as Date PathName = "G:\CC folder\Accounts\grape juice\LA Sheets\Concord " NewDate = DateSerial(Year(Date),Month(Date)+1,1) ' NewDate is the first of next month; otherwise if we put 'Day(Date)' instead of '1' ' then the code would blow up on January 30, March 31, etc. PathName = PathName & Format(NewDate, "mmmm") & ".xls" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Excel 2003 month to month data change grid | Excel Discussion (Misc queries) | |||
Create Month Timetable on a worksheet different month each works | Excel Worksheet Functions | |||
copy worksheet from previous month and rename to current month | Excel Programming | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) |