'方法一
Private Function RoundUp(dvalue As Single) As Long
RoundUp = -Int(-1 * dvalue)
End Function
'方法二
Function upint(ByVal dvalue As Single) As Long
Select Case Sgn(dvalue)
Case 1
upint = Int(dvalue) + 1
Case 0
upint = 1
Case -1
upint = Fix(dvalue)
End Select
End Function
附 件:
点击下载此附件
演 示: