Well, it depends on what exactly you mean by 'weeks in month'. If you mean
number of days in the month divided by seven, then the following code will
do it ...
Public Function WeeksInMonth(ByVal Month As Long, _
ByVal Year As Long) As Double
Select Case Month
Case 1, 3, 5, 7, 8, 10, 12
WeeksInMonth = 4.42857142857143
Case 4, 6, 9, 11
WeeksInMonth = 4.28571428571429
Case Else
'February, varies depending if leap year.
WeeksInMonth = (DateDiff("d", DateSerial(Year, Month, 1), _
DateSerial(Year, Month + 1, 1))) / 7
End Select
End Function