Public Function GetNextWeekDay(ByVal day As Date, ByVal target As DayOfWeek) As Date
Do Until day.DayOfWeek = target
day = day.AddDays(1)
Loop
Return day
End Function
Public Function GetNextWeekDay(ByVal day As Date, ByVal target As DayOfWeek) As Date
Dim dayweekday = CInt(day.DayOfWeek)
Dim add = target - dayweekday
If add <= 0 Then add += 7
Return day.AddDays(add).Date
End Function
Dim nextWednesday = GetNextWeekDay(Date.Now, DayOfWeek.Wednesday)
hey johnH, the date.AddDays(), just never seem to work the right way for me, even posted about it on this forum, i just ended up using the TimeSpan.