CitectVBA Programming Reference > CitectVBA Function Reference > Math/Trigonometry Functions > Abs


Calculates the absolute (positive) value of a number. The absolute value of a number is the number without its sign. Abs does not round the number, and ignores the fractional value of the number.




An integer or expression representing a valid numeric value.

Return Value

Returns the absolute value of the number (Num) provided in the argument.

The data type of the return value is the same as that of the number argument. However, if the number argument is a Variant of VarType (String) and can be converted to a number, the return value will be a Variant of VarType (Double). If the numeric expression results in a null, Abs returns a null.

Related Functions



Variable=Abs(-67); ! Sets Variable to 67.
Variable=Abs(67); ! Sets Variable to 67.