Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_GeneralGeneral Functions

Public Function RoundDbl (
amt As Variant,
Optional OpType As String = "S",
Optional RoundTo As Double = 0.01
) As Variant

Round the passed value to the nearest grain size, return as Double.

amt as Variant

The value to be rounded.

Optional OpType as String = "S"

S = Standard Rounding, T = Truncate, U = Round Up

Optional RoundTo as Double = 0.01

The grain size for rounding.

Call Template:

Dim v As Variant
v = xf.Gen.RoundDbl(amt)
v = xf.Gen.RoundDbl(amt, OpType, RoundTo)

See Also:

Example 1:

RoundDbl(Null)    => Null
RoundDbl(0.001)   => 0.00
RoundDbl(0.009)   => 0.01
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd