Function yh_bigmoney(ByVal num As Double) As String Dim intpart As Integer Dim dotpart As Integer Dim cm As Integer intpart = Int(num) dotpart = yh_round((num - intpart) * 1000) Dim retval As String,dotval As String Dim i As Integer Dim pre0 As Boolean ' Debug.Write(intpart) 'Debug.WriteLine("") 'Debug.Write(dotpart) 'Debug.WriteLine("") i = 0 pre0 = False While intpart > 0 cm = intpart Mod 10 If cm = 0 Then If i Mod 4 = 0 Then retval = bigm1.Chars(i) & retval ElseIf Not pre0 Then retval = bigm.Chars(cm) & retval End If pre0 = True Else pre0 = False retval = bigm.Chars(cm) & bigm1.Chars(i) & retval End If i = i + 1 intpart = intpart / 10 End While 'Debug.WriteLine(retval) If dotpart = 0 Then Return retval & "整" End If i = 0 pre0 = True dotval = "" While i < 3 cm = dotpart Mod 10 If cm = 0 Then If Not pre0 Then dotval = bigm.Chars(cm) & bigm2.Chars(i) & dotval End If Else dotval = bigm.Chars(cm) & bigm2.Chars(i) & dotval pre0 = False End If i = i + 1 dotpart = dotpart / 10 End While Return retval & dotval End Function 原文链接:https://www.f2er.com/vb/259836.html