Option Explicit
Public Function IsEven(Number As Double) As Boolean
IsEven = IIf(Number Mod 2 = 0, True, False)
End Function
Sample usage
Private Sub Command1_Click()
MsgBox IsEven(20) 'return true
End Sub
Private Sub Command1_Click()
MsgBox IsEven(21) 'return false
End Sub