- Home
·
- Math/Dates
·
- Find the last day of the Month using the IsDate function.
Find the last day of the Month using the IsDate function.
Find the last day of the Month using the IsDate function.
Rate Find the last day of the Month using the IsDate function.
(1(1 Vote))
' mail me for more code [email protected]
' for calling please note that lined
' Call Funcation like this ---> maxDate("06","2002")
Public Function maxDate(InputMonth As Variant, InputYear As Variant)
chkdate = ("29-" & InputMonth & "-" + InputYear)
If Not IsDate(chkdate) Then
maxDate = 28
Exit Function
End If
chkdate = ("30-" & InputMonth & "-" + InputYear)
If Not IsDate(chkdate) Then
maxDate = 29
Exit Function
End If
chkdate = ("31-" & InputMonth & "-" + InputYear)
If Not IsDate(chkdate) Then
maxDate = 30
Else
maxDate = 31
End If
End Function
Find the last day of the Month using the IsDate function. Comments
No comments yet — be the first to post one!
Post a Comment