How to highlight a week if the week number is given. e.g. against week number 22, the form must show the dates ranging between 2/july/08 to 9/july/08.
Thanx in advance :)
findout the days .
add those many days to 1st of jan
then highlight those days.
You can use DateAdd () Function
DateAdd ( Interval As String, Number As Double, DateValue As Date ) As Date
Interval - String expression representing the time interval you want to add
Give interval as "ww" for week
Number - Floating-point expression representing the number of intervals you want to add
Date - An expression representing the date and time to which the interval is to be added
Dim DateRangeFrom As Date Dim DateRangeTo As Date Dim WeekOfTheYear As Integer WeekOfTheYear = 22 DateRangeFrom = DateAdd("ww", WeekOfTheYear - 1, CDate("1/1/2008")) DateRangeTo = DateRangeFrom + 7 MsgBox " From " & DateRangeFrom & " To " & DateRangeTo