Syntax
Public Function MathRound(Number As Double, Optional digitNumber As Long) As Variant
Description
This function used to return the number rounded to the nearest specified digit.
Parameters
Key | Description |
Number | The specified to be rounded,value of type Double. |
digitNumber | Number of round digits, value of type Long. |
Return value
Returns a rounded value as double
Note:
If this digitNumber Parameter is omitted, then the round function will return an integer value.
Sample
Public Sub main()AlertMessage MathRound(10.12345,2) 'The Alert Message will reurn 10.12 End Sub
See Also