怎样保留三位小数??(求助!!)
<P>Sub nn()<BR>Dim a, b As Double<BR>Dim c As String<BR>a = 10006466.20023<BR>b = FormatNumber(a, 3)<BR>c = FormatNumber(a, 3)<BR>MsgBox (b)<BR>MsgBox (c)<BR>b = Int(a * 1000 + 0.5) / 1000<BR>MsgBox (b)<BR>End Sub</P><P>显示结果为10006466.2或者10,006,466.200</P>
<P>问怎样才能使结果为10006466.200</P>
<P>请各位仁兄帮忙!!</P> b = Int(a * 1000 + 0.5) / 1000<BR>b=format(b,"0.000") 谢谢!!! <P>round(value,n)</P>
<P>n为保留位数</P>
页:
[1]