Method: Abs for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Abs for VBS
Method: Abs for VBS
Calculates the absolute value of a number.
vAbs = Object.Abs(number)
| Object | VBS Object with this method. You do not need to specify this object. |
| number | Variant Specifies any numeric expression. |
| vAbs | Variant Receives the absolute value. |
The following example calculates the absolute value of a number.
Call MsgBox(Abs(47.11)) ' Returns 47.11 Call MsgBox(Abs(-47.11)) ' Returns 47.11