E
Edwin Kelly
Asking the group for assistance on calculating in VBA the Date for Monday of
the current week (Using Monday as the first day of week). This has to work
across years accurately. Ex., 12-29-08, 01-05-09 etc.
I've tried looking at the posts and can't seem to figure it out. I've used
the WeekStart and YearStart functions from the C Pearson website and am
unable to get them to work for what I need.
Tried using the calc below to get the right day. Getting the month and year
is easy but the day is a bit tricky. Guess I'm just doing it wrong.
sDay = DatePart("d", WeekStart(DatePart("ww", Now, vbMonday,
vbFirstFullWeek), CInt(Year(Now))))
the current week (Using Monday as the first day of week). This has to work
across years accurately. Ex., 12-29-08, 01-05-09 etc.
I've tried looking at the posts and can't seem to figure it out. I've used
the WeekStart and YearStart functions from the C Pearson website and am
unable to get them to work for what I need.
Tried using the calc below to get the right day. Getting the month and year
is easy but the day is a bit tricky. Guess I'm just doing it wrong.
sDay = DatePart("d", WeekStart(DatePart("ww", Now, vbMonday,
vbFirstFullWeek), CInt(Year(Now))))