Function czRound(tmpValue as double,optional tmpDigit as integer=0) As double
dim tmpResult as double=0
dim tmpFormat as string="#"
dim intX as integer
if tmpdigit >0 then
tmpformat="#."
for intx=1 to tmpDigit
tmpFormat=tmpFormat +"#"
next
end if
tmpResult=cdbl(format(tmpvalue,tmpFormat))
return tmpResult
End Function