17-10-12, 01:07 AM
كاتب الموضوع : AhmedEssawy
كود :
Public Function LastDay(dDate As Date) As Integer
Dim i As Integer
Dim d As Date
For i = 31 To 28 Step -1
If IsDate(Month(dDate) & "/" & trim(Str(i)) & _
"/" & Year(dDate)) Then
LastDay = i
Exit Function
End If
Next
End Function