- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
Public Function fRoundSumma(pDbl As Double) As Double
On Error Resume Next
Dim vStrSum As String
If vFieldRoundSummuDoInt Then
vStrSum = str(pDbl)
If InStr(1, vStrSum, ".5") > 0 Then
If pDbl < 0 Then
fRoundSumma = Abs(Fix(pDbl)) + 1
fRoundSumma = fRoundSumma * (-1)
Else
fRoundSumma = Fix(pDbl) + 1
End If
Else
fRoundSumma = Round(pDbl, 0)
End If
Else
fRoundSumma = Round(pDbl, vFieldRoundDo)
End If
End Function
Такое забавное округление. Из коммерческого проекта :)
SemaReal 28.03.2018 05:45 # 0