新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Sub Command1_Click()
Dim curA As Currency
Dim strSay As String
curA = 0.6789812
strSay = "保留三位小数" & Format(CCur(curA * 1000) / 1000, "0.000")
Debug.Print strSay
End Sub
运行结果:
保留三位小数0.679