domino ls 处理小数,保留多少位

使用round函数:


'计算提交率

Dim k As Double
Dim s As String
k = 0
s = "0"
If n<>0 And m<>0 Then
k = Round(n/m,2)
If k<1 Then
s = com_replacesubstring("-" & k ,"-.","0.")
Else
s = Cstr(k)
End If
End If

你可能感兴趣的:(domino)