Public Function Round(d As Double, precision As Integer) As Double Dim multiplier = Math.Pow(10, precision) Return CInt(d * multiplier) / multiplier End Function