- Home
·
- Math/Dates
·
- The built in Round() function in VB does not round $$$ amounts correctly. The following Round Funct
The built in Round() function in VB does not round $$$ amounts correctly. The following Round Funct
The built in Round() function in VB does not round $$$ amounts correctly. The following Round Function will do it correctly.
Rate The built in Round() function in VB does not round $$$ amounts correctly. The following Round Funct
(1(1 Vote))
Function RoundPennies(piNum)
Dim newNum
newNum = CDbl(Round(piNum, 2))
If (CDbl(newNum) < CDbl(piNum) And CDbl(piNum - newNum) >= CDbl(0.005)) Then
newNum = newNum + CDbl(0.01)
End If
RoundPennies = newNum
End Function
The built in Round() function in VB does not round $$$ amounts correctly. The following Round Funct Comments
No comments yet — be the first to post one!
Post a Comment