'Convert the lower-case currency into upper-case currencies. For example, the shard points in the round
Public Function num2chi (byval txtje as double) as string
Dim I, K as integer
Dim NC, Nd, ka, chrnum, strzheng as string
Dim C1, C2, C3 as string
Dim K1 as integer
Dim Zheng as string
Dim Xiao as string
NC = trim (format (txtje, "#0.00 "))
C1 = "collect tens of thousands of yuan, collect hundreds of millions of yuan, and collect tens of thousands of yuan"
C2 = "Angular score"
C3 = "Lu Wusi Yu eryi"
If NC = 0 then
Num2chi = "Zero RMB"
Exit Function
End if
Num2chi = ""
Zheng = mid (NC, 1, (LEN (NC)-3 ))
Xiao = mid (NC, (LEN (Zheng) + 2 ))
If Val (Xiao) <> 0 then
For I = Len (Xiao) to 1 step-1
Chrnum = mid (Xiao, I, 1)
If chrnum <> 0 then
Num2chi = mid (C2, I, 1) & num2chi
Num2chi = mid (C3, (LEN (C3)-chrnum + 1), 1) & num2chi
End if
Next I
End if
K = 0
If Val (Zheng) <> 0 then
Num2chi = "Yuan" & num2chi
For I = Len (Zheng) to 1 step-1
If (LEN (Zheng)-I) = 4 then
Num2chi = "Ten Thousand" & num2chi
Elseif (LEN (Zheng)-I) = 8 then
Num2chi = "" & num2chi
Elseif (LEN (Zheng)-I) = 12 then
Num2chi = "Ten Thousand" & num2chi
End if
Chrnum = mid (Zheng, I, 1)
If chrnum <> 0 then
If I = Len (Zheng) then
Num2chi = mid (C3, (LEN (C3)-chrnum + 1), 1) & num2chi
Else
If (LEN (Zheng)-I) <> 4 and (LEN (Zheng)-I) <> 8 and (LEN (Zheng)-I) <> 12 then
Num2chi = mid (C1, (LEN (C1)-K), 1) & num2chi
End if
Num2chi = mid (C3, (LEN (C3)-chrnum + 1), 1) & num2chi
End if
Else
If mid (num2chi, 1, 1) <> "Yuan" and mid (num2chi, 1, 1) <> "Ten Thousand" and mid (num2chi, 1, 1) <> "billion" then
If mid (num2chi, 1, 1) <> "zero" then
Num2chi = "0" & num2chi
End if
End if
End if
K = k + 1
Next I
End if
If right (TRIM (num2chi), 1) <> "points" then
Num2chi = num2chi & "integer"
End if
End Function