Method: Fix for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Fix for VBS
Method: Fix for VBS
Specifies the integer part of a number by removing the decimal places.
vFix = Object.Fix(number)
| Object | VBS Object with this method. You do not need to specify this object. |
| number | Variant Specifies any numeric expression. |
| vFix | Variant Receives the integer part of a number. For negative numbers, the similar Int method returns integer numbers that are less than or equal to the argument. |
The following example specifies the integer part of various numbers:
Call MsgBox(Fix(99.2)) ' Returns 99 Call MsgBox(Fix(-99.8)) ' Returns -99 Call MsgBox(Fix(-99.2)) ' Returns -99