bueno aqui hay ejemplo bastante sencillo
solo ingresas la fecha alguna fecha del mes que queres saber la fecha y listo..
Código:
Private Sub Command1_Click()
MsgBox DaysInMonth(Date)
End Sub
Public Function DaysInMonth(dteInput As Date) As Integer
DaysInMonth = DateAdd("m", 1, dteInput) - dteInput
End Function