|
On Error GoTo 101
Dim strData As String, strMid As String, j As Integer, AA As String, BB As String, ChangeDataLength As Integer, ReturnDigitally As String
AA = "分角圆拾佰仟万拾佰仟亿拾佰仟万"
BB = "壹贰叁肆伍陆柒捌玖"
ChangeData = Round(ChangeData, 2) * 100
strData = CStr(ChangeData)
ChangeDataLength = Len(strData)
For j = 1 To Len(strData)
strMid = Mid(strData, ChangeDataLength - j + 1, 1)
ReturnDigitally = Mid(AA, j, 1)
If strMid = "0" Then
If j = 1 Then
Changeover = "整"
Else
If InStr(1, "圆万亿", ReturnDigitally) Then
If ReturnDigitally = "亿" Then GoSub 200
Changeover = ReturnDigitally & Changeover
Else
If InStr(1, "零整圆万亿", Left(Changeover, 1)) = 0 Then Changeover = "零" & Changeover
End If
End If
Else
If ReturnDigitally = "亿" Then GoSub 200
Changeover = ReturnDigitally & Changeover
Changeover = Mid(BB, CInt(strMid), 1) & Changeover
End If
Next j
100:
Exit Function
101:
MsgBox Err.Description
Resume 100
200:
If Left(Changeover, 1) = "万" Then Changeover = Right(Changeover, Len(Changeover) - 1)
Return |
|