17-10-12, 01:10 AM
كاتب الموضوع : AhmedEssawy
كود :
Public Function compareDates(Date1 As Date, Date2 As Date) As _
Integer
' If Date1 is greater the function returns the number 1
' If Date2 is greater the function returns the number 2
' If Date1 equals Date2 the function returns the number 0
Select Case Date1
Case Is > Date2
compareDates = 1
Case Is < Date2
compareDates = 2
Case Else
compareDates = 0
End Select
End Function