Does somebody now what function or does someone have some code for receiving
a Date when my input value is a week number?
I will appreciate any help. :)
Printable View
Does somebody now what function or does someone have some code for receiving
a Date when my input value is a week number?
I will appreciate any help. :)
you can use the "dateAdd" function.
Code:MsgBox DateAdd("WW", weekNumber, "01/01/2000")
Then offset Iain17's result to get the day you want. I think his returns a Saturday, ie End of Week).
Code:Function FirstOfWeek(Optional dteDate As Date) As Date
' Assuming Sunday is first day of week.
If CLng(dteDate) = 0 Then
dteDate = Date
End If
FirstOfWeek = dteDate - Weekday(dteDate) + 1
End Function