¸ù¾ÝÊý×ֵĶÁ·¨£¬Ð´ÁËÒ»¸ö°ÑÊý×Öת³ÉÖÐÎÄ×Ö·û´®µÄ³ÌÐò ²ÎÊýһΪÊý×Ö ²ÎÊý¶þΪÊDz»ÊÇ·´»ØÈËÃñ±Ò´óд ²ÎÊýÈýΪÊDz»ÊÇÖ±½Ó¶ÁÊý×Ö£¬·ñÔò´øÓÐÊ®°ÙµÈµ¥Î» ²ÎÊýËÄΪÉèÖÃСÊýµãºóÃæµÄλÊý£¬Ä¬ÈÏΪ4 ʹÓ÷½·¨ÊÇ t=GetChinaNum(20005.000436, , , 7)'·µ»Ø ¡°¶þǧÁãÎåµãÁãÁãÁãËÄÈýÁù¡± t=GetChinaNum(2005.436, True, , 7)'·µ»Ø¡°·¡ÇªÁãÎéÔªËÁ½ÇËÁ·Ö¡± t=GetChinaNum(2005.436, , True, 7)'·µ¼Ó¡°¶þÁãÁãÎåµãËÄÈýÁù¡± ÏÂÃæÊdzÌÐò´úÂë Function GetChinaNum(otherNum As Double, Optional isRMB As Boolean, Optional numOption As Boolean, Optional dotNum As Integer) As String On Error Resume Next num = Trim(Str(Int(otherNum))) If isRMB Then numwei = "Ê°°ÛǪÍòÊ°°ÛǪÒÚÊ°°ÛǪ" numshu = "ÁãÒ¼·¡ÈþËÁÎé½Æâ°Æ¾ÁÊ°" Else numwei = "Ê®°ÙǧÍòÊ®°ÙǧÒÚÊ®°Ùǧ" numshu = "ÁãÒ»¶þÈýËÄÎåÁùÆ߰˾ÅÊ®" End If If otherNum < 20 And otherNum >= 10 Then num = Right(num, 1) GetChinaNum = Left(numwei, 1) End If For i = 1 To Len(num) bstr = Mid(num, i, 1) If numOption Then GetChinaNum = GetChinaNum + Mid(numshu, Val(bstr) + 1, 1) Else GetChinaNum = GetChinaNum + Mid(numshu, Val(bstr) + 1, 1) If bstr = "0" Then If Mid(numwei, Len(num) - i, 1) = "Íò" Or Mid(numwei, Len(num) - i, 1) = "ÒÚ" Then Do While Right(GetChinaNum, 1) = "Áã" GetChinaNum = Left(GetChinaNum, Len(GetChinaNum) - 1) Loop GetChinaNum = GetChinaNum + Mid(numwei, Len(num) - i, 1) End If Else GetChinaNum = GetChinaNum + Mid(numwei, Len(num) - i, 1) End If GetChinaNum = Replace(GetChinaNum, "ÁãÁã", "Áã") End If Next i If numOption = False Then Do While Right(GetChinaNum, 1) = "Áã" GetChinaNum = Left(GetChinaNum, Len(GetChinaNum) - 1) Loop End If If isRMB Then numrmb = "Ôª½Ç·Ö" GetChinaNum = GetChinaNum + Mid(numrmb, 1, 1) If Val(num) <> otherNum Then num = Trim(Str(Round(otherNum - Val(num), 2))) For i = 2 To Len(num) bstr = Mid(num, i, 1) GetChinaNum = GetChinaNum + Mid(numshu, Val(bstr) + 1, 1) + Mid(numrmb, i, 1) Next i Else GetChinaNum = GetChinaNum + "Õû" End If Else If Val(num) <> otherNum Then If dotNum = 0 Then dotNum = 4 num = Trim(CStr(Round(otherNum - Val(num), dotNum))) If GetChinaNum = "" Then GetChinaNum = "Áã" GetChinaNum = GetChinaNum + "µã" For i = 2 To Len(num) bstr = Mid(num, i, 1) GetChinaNum = GetChinaNum + Mid(numshu, Val(bstr) + 1, 1) Next i End If End If End Function |