#32003/9/12 21:47:48
Function china(str)
dim nub,mystr
nub = Len(str)
mystr = ""
For i = 1 To nub
Select Case i
Case 2
mystr = "十"&mystr
Case 3
mystr = "百"&mystr
Case 4
mystr = "千"&mystr
End Select
mystr = Left(Right(str,i),1)&mystr
mystr = Replace(mystr,0,"零")
mystr = Replace(mystr,1,"一")
mystr = Replace(mystr,2,"二")
mystr = Replace(mystr,3,"三")
mystr = Replace(mystr,4,"四")
mystr = Replace(mystr,5,"五")
mystr = Replace(mystr,6,"六")
mystr = Replace(mystr,7,"七")
mystr = Replace(mystr,8,"八")
mystr = Replace(mystr,9,"九")
Next
mystr = Replace(mystr,"零百零十零","")
mystr = Replace(mystr,"零百零十","零")
mystr = Replace(mystr,"零百","零")
mystr = Replace(mystr,"零十零","")
mystr = Replace(mystr,"零十","零")
mystr = Replace(mystr,"十零","十")
china = mystr
End Function
---------------------------------------------------------------
限于0-9999,后面去零的代码太伤脑筋
china(9999)