|
金额大写转换(4) Dim IntLen As Integer Dim i As Integer Dim StrKey As String Dim StrRet As String Dim IntKey As Integer IntLen = Len(StrVal) For i = 1 To IntLen StrKey = Mid(StrVal, i, 1) IntKey = Val(StrKey) If IntKey = 0 Then '“零”作特殊处理 If i <> IntLen Then '转换后数末位不能为零 StrRet = StrRet & "零" End If Else 'If IntKey = 1 And i = 2 Then '“壹拾”作特殊处理 '“壹拾”合理 'Else StrRet = StrRet & Mid(PrvStrNum, Val(StrKey), 1) 'End If '追加单位 If i <> IntLen Then '个位不加单位 StrRet = StrRet & Mid(PrvStrUnit, Len(PrvStrUnit) - IntLen + i, 1)
|