Test it:
Option Compare Database
Option Explicit
Sub Test()
Dim dCurDate As Date, dStartDate As Date, dEndDate As Date
dStartDate = CDate("2012-10-16")
dEndDate = CDate("2013-04-15")
dCurDate = dStartDate
Do While dCurDate < dEndDate
MsgBox Format(dCurDate, "MMMM yyyy") & " has " & GetCountOfWeeks(dCurDate) & " weeks!", vbInformation, "Message..."
dCurDate = DateAdd("M", 1, dCurDate)
Loop
End Sub
Function GetCountOfWeeks(dInitialDate As Date) As Integer
Dim retVal As Integer
Dim dCurDate As Date, dStartDate As Date, dEndDate As Date
retVal = 0
dStartDate = GetFirstDayInMonth(dInitialDate)
dCurDate = dStartDate
dEndDate = GetLastDayInMonth(dInitialDate)
Do While dCurDate < dEndDate
If Weekday(dCurDate) = vbSunday Then retVal = retVal + 1
dCurDate = DateAdd("d", 1, dCurDate)
Loop
GetCountOfWeeks = retVal
End Function
Function GetFirstDayInMonth(dDate As Date) As Date
GetFirstDayInMonth = DateSerial(Year(dDate), Month(dDate), 1)
End Function
Function GetLastDayInMonth(dDate As Date) As Date
GetLastDayInMonth = DateSerial(Year(dDate), Month(dDate) + 1, 1 - 1)
End Function