even numbers
Just another option. If you have a vba library reference set to
atpvbaen.xls, then you can use IsOdd / IsEven directly.
Sub Demo()
Debug.Print IsOdd(12345678901234)
Debug.Print IsEven(12345678901234)
Debug.Print IsOdd(12345678901235)
Debug.Print IsEven(12345678901235)
End Sub
returns...
False
True
True
False
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =
"Tommi" wrote in message
...
How to check in VBA code if number is even (or odd)?
|