Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have adapted some code from Tom Ogilvy that is processed at Workshee
Open. It gives me the weekend date "dWeekEnding".(Which for m application is a Friday). Dim dt As Date Dim dWeekEnding As Variant If Weekday(Date, vbSunday) = 2 Then dt = Date + 4 dWeekEnding = Format(dt, "dd.mm.yyyy") End If What i want to do (But can't) is find a way to get the dates for Monda - Friday into variables (With the format "dd.mm.yyyy"): Day1Date(Mondays Date) Day2Date(Tuesdays Date) Day3Date(Wednesdays Date) Day4Date(Thursdays Date) Day5Date(FridaysDate) So if dWeekEnding = "23.07.2004" i want Day1Date ="19.07.2004" Day2Date ="20.07.2004" etc. I want them to be defined at worksheet open (So incorparated into th code above) and then to be available in any Procedure in m application. (I have tried making dWeekEnding "Public" but just got a error about a mismatch). Please can someone suggest a way to do this. Many thanks -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change date in excel from today to original date of file | Excel Discussion (Misc queries) | |||
Weekending Date w/Less Than 3 days Assoc. with Prior Month | Excel Worksheet Functions | |||
Rounding Dates to Weekending Date | Excel Discussion (Misc queries) | |||
IF TODAY equals date in cell A10, or if TODAY is beyond that date | Excel Worksheet Functions | |||
Weekending date issue | Excel Discussion (Misc queries) |