Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating date
I am showing you a cross section of some code :
Sub Download_Nostros() Sheets("Data").Select ActiveSheet.Unprotect Range("All_NOSTRO").Select Selection.ClearContents Workbooks.Open FileName:= _ "\\my_documents\downloads\P51GRPR-SEP15.xls" Range("A1:K500").Select Selection.Copy How do I automatically update or change "P51GRPR- SEP15.xls" to the next working day. Any help would be greatly appreciated. Richard |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating date
Dim nDay as Long, sStr as String, fName as String
sStr = "\\my_documents\downloads\P51GRPR" nday = Choose(weekday(Date),1,1,1,1,1,3,2) fname = sSTr & ucase(format(date+nday,"MMMDD")) & ".xls" Workbooks.Open Filename:=fname -- Regards, Tom Ogilvy "Richard Leclezio" wrote in message ... I am showing you a cross section of some code : Sub Download_Nostros() Sheets("Data").Select ActiveSheet.Unprotect Range("All_NOSTRO").Select Selection.ClearContents Workbooks.Open FileName:= _ "\\my_documents\downloads\P51GRPR-SEP15.xls" Range("A1:K500").Select Selection.Copy How do I automatically update or change "P51GRPR- SEP15.xls" to the next working day. Any help would be greatly appreciated. Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatically updating a date | Excel Discussion (Misc queries) | |||
Updating with current date | Excel Discussion (Misc queries) | |||
date updating | Excel Worksheet Functions | |||
updating date! | Excel Worksheet Functions | |||
printing while updating date... | Excel Discussion (Misc queries) |