Hi All, I am trying to output records to Excel for every day of the week, how do i find first date of this week number and last date of this week number ? So the end result would be on the Excel pages
Dim mWeek as Long
Dim mStart A Date, mEnd As Date
Dim dt1 as Date, dt2 as Date, dt3 as Date, dt4 as Date, dt5 as Date, dt6 as Date
mWeek = Format(Now(), "ww")
mStart = Find Sundays date from mWeek ??
mEnd = Find Saturdays date from mWeek ??
dt1 = Format(mStart,"ddd-dd-mm-yy")
dt2 = Format(mStart,"ddd-dd-mm-yy") + 1 will this result in Mon-02-12-18 ?
dt3 = Format(mStart,"ddd-dd-mm-yy") + 2 will this result in Tue-03-12-18 ?
Sheet1 = "Week" & " " & (mWeek) & " " & "Overview"
Sheet2 = dt1
Sheet3 = dt2
Sheet4 = dt3
Sheet5 = dt4
Sheet6 = dt5
Sheet7 = dt6
Sheet8 = dt7
I can then set my recordset between mStart and mEnd For the overview Sheet1
Then set the other recordsets where date = #" dt1 & "#" etc etc.....
I can then do all recordsets to suit
thanks in advance