**Public Function NextEven( _
ByVal vX As Variant _
) As Variant**

**"Next Even Number" **

Returns the next larger even number.

**Examples:** NextEven(1) = 2
NextEven(2) = 4
NextEven(3) = 4
NextEven(22.4) = 24
NextEven(-1.7) = 0
NextEven(-6.5) = -6
NextEven(-7.8) = -6

**See also:** NextEvenSample Subroutine
NextOdd Function
NextNumber Function
PreviousEven Function

**vX:** Number which is rounded-up to the next even number (i.e. 2, 4, 6, -2, -4, -6, etc.). Function returns Null if vX is Null or cannot be fixed up to a number.

**Note:** Similar to calling the Ceiling function with a precision of 2 (two), except that if vX is already an even number, this function returns the next even number.

**Note:** Zero is considered an even number, as are all negative numbers divisible by two. Copyright 1996-1999 Entisoft

Entisoft Tools is a trademark of Entisoft.