How to determine the next specified day’s date.
To determine next Thursday’s date:
Use:
Dim dt as Date dt = NextXDay(vbThursday)
And the function:
Function NextXDay(ByVal vbDay As Integer) As Date Dim newdate As Date newdate = Date + 1 NextXDay = newdate + (vbDay - DatePart("w", newdate)) End Function
David Gregory Medina
Post created by: David Gregory Medina
Leave a Reply