This is a follow-up from:
have discovered a problem with this code but I am unable to fix it.
When a month begins on a Saturday (as in November 1, 2008) which evaluates to week 1 for the month, the code puts the cursor
in the column 28 (which is week 2 for my five ranges). However, because the user is allowed to enter only workdays in
columns 5, 28, 51, 74 and 97, I want the first workday (M-F) of the month to be entered in column 5 and the following weeks
entered in the other columns 28, 51, 74, and 97, accordingly. Hence, there would always be five work weeks in any month.
I added the following after the iWeek formula:
If Weekday(Year(Now()), Month(Now()), 1) = 7 Then
CrntWeek = Array(0, 5, 28, 51, 74, 97)
but it gave a compile error
Can someone please help me fix it.