|
Function Dx(ysz) As String
Dim dxxz As String
Dim dws As String
Dim lss As String
Dim ss As String
Dim i, ii As Long
ysz = Int(ysz * 10) / 10
If ysz = 0 Then
Dx = "零"
GoTo dx_exit
End If
ss = ""
i = 1
lss = Right(Str(100000000 + ysz * 10), 8)
dxxz = "零壹贰叁肆伍陆柒捌玖"
dws = "佰拾万仟佰拾元角"
Do
ii = Val(Mid(lss, i, 1))
If ii <> 0 Then Exit Do
If ii = 0 Then
i = i + 1
End If
Loop
Do While i <= 8
ss = ss + Mid(dxxz, Val(Mid(lss, i, 1)) + 1, 1) + Mid(dws, i, 1)
i = i + 1
Loop
Dx = ss + "整"
dx_exit:
End Function
这是我抄的个函数。
我以前用此函数未见问题。最近发现:
当小数第一位为单数时,小1,如:43.1,它写成43.0的大写。
偶数正常,为什么,
|
|