Roundoff a decimal number
This sample code shows how to roundoff a decimal number.
Function SRound(Real As Double) As Integer
Dim tmp As Integer
tmp = Val(Real)
If Real - tmp >= 0.5 Then
SRound = tmp + 1
Else
SRound = tmp
End If
End Function
yes We have Math.Round(decimal/double)
Math.Round(decimal/double, int number)
number of digits: The number of significant digits (precision) in the return value.