Okay. The problem is in the
Select Case CurrentDay , ..... End Select section.
As someone nicely pointed out in a previous post, you could have a possibility of 6 weeks in a month, if Day 1 fell on a Saturday (maybe even a Friday with 31 days?). That's why there are 6 cases: Case 1, Case 2, Case 3, ...., Case 6.
You simply have to determine that your tests in each of the 6 cases make sense.
Case 1 should always be from 1 to intFirstSaturday.
If you'll look at the code
' First Saturday should always be the following:
intFirstSaturday = 8 - intFirstDay
You should be able to find the actual day for the First Saturday of the month with that formula. The Day() fundtion returns which day of the week a certain day happens to fall on: Sunday, Monday, Tuesday, Wednesday, etc. So, if Day(#3/1/2009#) returns a value of 1, then 8 - 1 = 7: March 7, is Saturday, in other words.
That's the first test for Case 1
Case 2 should start with the Day after the first Saturday or intFirstSaturday + 1 or as in the above code: IntFirstDayWeekTwo.
We're testing from Sunday to Saturday or a period of 7 days. So
Case (intFirstDayWeekTwo) to (intFirstDayWeekTwo + 6 )
Ah, I think I see the error. It begins in Case 3. I think I should be adding 7 instead of 6. So that should be + 13 instead of 12?, 20 instead of 18, etc.
That may give you enough to go on.