Syntax |
Abs(expression) |
Description |
Returns the absolute value of expression. |
Comments |
If expression is Null, then Null is returned. Empty is treated as 0. The type of the result is the same as that of expression, with the following exceptions:
Dim a As Variant Dim i As Integer
Dim a As Variant Dim l As Long
|
Example |
This example assigns absolute values to variables of four types and displays the result. Sub Main() s1% = Abs(-10.55) |
See Also |
Sgn (function). |
A |