Public Function URmb(ByVal Money As Double) As String
Dim Intlen As Integer, i As Integer, strMoney As String
strMoney = Format(Money, "#.##") * 100
Intlen = Len(strMoney)
If Intlen > 14 Then MsgBox "超出范围!": Exit Function
For i = 1 To Intlen
URmb = Mid("零壹贰叁肆伍陆柒捌玖", Mid(strMoney, Intlen + 1 - i, 1) + 1, 1) & _
Mid("分角元拾佰仟万拾佰仟亿拾佰仟", i, 1) & URmb
Next
End Function
这个函数该论坛中就有! 做的非常简练! 好用!
Public Function URmb(ByVal Money As Double) As String
Dim Intlen As Integer, i As Integer, strMoney As String
strMoney = Format(Money, "#.##") * 100
Intlen = Len(strMoney)
If Intlen > 14 Then MsgBox "超出范围!": Exit Function
For i = 1 To Intlen
URmb = Mid("零壹贰叁肆伍陆柒捌玖", Mid(strMoney, Intlen + 1 - i, 1) + 1, 1) & _
Mid("分角元拾佰仟万拾佰仟亿拾佰仟", i, 1) & URmb
Next
End Function
这个函数该论坛中就有! 做的非常简练! 好用!
谢谢你的指导,我试试看
总记录:3篇 页次:1/1 9 1 :