I've done this and it has an error.....the last part...the part before the next statement and before then end select statement...If i remove that part it doesn't have any errors..how come? Please help me out with this <BR><BR>Dim CurrentDay <BR>Dim CurrentMonth <BR>Dim CurrentYear <BR>Dim NewMonth <BR>Dim CurrentDayDate <BR>Dim strDate <BR><BR> currentDay = day(date) <BR> currentMonth = month(date) <BR> currentYear = year(date) <BR> <BR> select case (WeekDay(now)) <BR>case 1 <BR> currentDay = (currentDay - 6) <BR> case 2 <BR> currentDay = (currentDay - 0) <BR>Case 3 <BR> currentDay = (currentDay - 1) <BR>case 4 <BR> currentDay = (currentDay - 2) <BR>case 5 <BR> currentDay = (currentDay - 3) <BR>case 6 <BR> currentDay = (currentDay - 4) <BR>case 7 <BR> currentDay = (currentDay - 5) <BR>End Select <BR><BR>If currentDay <= 0 Then <BR>currentMonth = month(date) <BR>If currentMonth <> 0 Then <BR>currentMonth = currentMonth - 1 <BR>Select Case CurrentMonth <BR> Case 2, 4, 6, 9, 11 <BR> CurrentDay = (CurrentDay + 31) <BR> Case 1, 5, 7, 8, 10 <BR> CurrentDay = (CurrentDay + 30) <BR> Case 3 <BR> CurrentYear = Year(Date) <BR> If (CurrentYear Mod 4 = 0) Or (CurrentYear Mod 100 = 0) Then <BR> CurrentDay = (CurrentDay + 29) <BR> Else <BR> CurrentDay = (CurrentDay + 28) <BR> End If <BR> End Select <BR> currentMonth = (currentMonth - 1) <BR>Else <BR> currentDay = (currentDay + 31) <BR> currentMonth = 12 <BR> currentYear = (currentYear - 1) <BR>end if <BR>end if <BR> <BR>strDate = currentDay & "/" & currentMonth & "/" & currentYear <BR>document.write strdate <BR><BR>Dim strDate1(3) <BR>dim i <BR> for i = 0 to (Ubound(strDate1()) - 1) <BR> CurrentDay = (CurrentDay + 7) <BR> Select Case (CurrentMonth) <BR> Case 1, 3, 5, 7, 8, 10 <BR> If CurrentDay > 31 Then <BR> CurrentDay = (CurrentDay - 31) <BR> CurrentMonth = (CurrentMonth + 1) <BR> End If <BR> Case 4, 6, 9, 11 <BR> If CurrentDay > 30 Then <BR> CurrentDay = (CurrentDay - 30) <BR> CurrentMonth = (CurrentMonth + 1) <BR> End If <BR> Case 2 <BR> If (CurrentYear Mod 4 = 0) Or (CurrentYear Mod 100 = 0) Then <BR>CurrentDay = (CurrentDay - 29) <BR>CurrentMonth = (CurrentMonth + 1) <BR> Else <BR>CurrentDay = (CurrentDay - 28) <BR> End If <BR> Case 12 <BR> If CurrentDay > 31 Then <BR> CurrentDay = (CurrentDay - 31) <BR> CurrentYear = (CurrentYear + 1) <BR> CurrentMonth = 1 <BR> End If <BR> End Select <BR>strDate1(i) = currentDay & "/" & currentMonth & "/" currentYear <BR>document.writeln strDate1(i) <BR> Next <BR>