[Include]
IsGregYear

[CODE]
Public Function GetMonthDaysFromString(ByVal DateString As String) As Long
  Select Case Val(Mid(DateString, 6&, 2&))
    Case 1&, 3&, 5&, 7&, 8&, 10&, 12&
      GetMonthDaysFromString = 31&
    Case 2&
      GetMonthDaysFromString = 28& - CLng(IsGregYear(Val(Left(DateString, 4&))))
    Case 3&, 5&, 9&, 11&
      GetMonthDaysFromString = 31&
    End Select
  End Function