»áÔ±£º ÃÜÂ룺 ¡¡Ãâ·Ñ×¢²á | Íü¼ÇÃÜÂë | »áÔ±µÇ¼ ÍøÒ³¹¦ÄÜ£º ¼ÓÈëÊÕ²Ø ÉèΪÊ×Ò³ ÍøÕ¾ËÑË÷  
 °²È«¼¼Êõ¼¼ÊõÎĵµ
  ¡¤ °²È«ÅäÖÆ
  ¡¤ ¹¤¾ß½éÉÜ
  ¡¤ ºÚ¿Í½Ìѧ
  ¡¤ ·À»ðǽ
  ¡¤ Â©¶´·ÖÎö
  ¡¤ ÆƽâרÌâ
  ¡¤ ºÚ¿Í±à³Ì
  ¡¤ ÈëÇÖ¼ì²â
 °²È«¼¼ÊõÂÛ̳
  ¡¤ °²È«ÅäÖÆ
  ¡¤ ¹¤¾ß½éÉÜ
  ¡¤ ·À»ðǽ
  ¡¤ ºÚ¿ÍÈëÇÖ
  ¡¤ Â©¶´¼ì²â
  ¡¤ Æƽⷽ·¨
  ¡¤ É±¶¾×¨Çø
 °²È«¼¼Êõ¹¤¾ßÏÂÔØ
  ¡¤ É¨Ã蹤¾ß
  ¡¤ ¹¥»÷³ÌÐò
  ¡¤ ºóÃÅľÂí
  ¡¤ ¾Ü¾ø·þÎñ
  ¡¤ ¿ÚÁîÆƽâ
  ¡¤ ´úÀí³ÌÐò
  ¡¤ ·À»ðǽ
  ¡¤ ¼ÓÃܽâÃÜ
  ¡¤ ÈëÇÖ¼ì²â
  ¡¤ ¹¥·ÀÑÝʾ
¼¼ÊõÎĵµ > VBÎĵµ > ÆäËûÎĵµ
ÓÃVB°ÑÊý×Öת³ÉÖÐÎÄ×Ö·û´®
·¢±íÈÕÆÚ£º2002-09-13 00:00:00×÷ÕߣºÀ ³ö´¦£º  

¸ù¾ÝÊý×ֵĶÁ·¨£¬Ð´ÁËÒ»¸ö°ÑÊý×Öת³ÉÖÐÎÄ×Ö·û´®µÄ³ÌÐò

²ÎÊýһΪÊý×Ö

²ÎÊý¶þΪÊ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

¡¾·µ»Ø¶¥²¿¡¿ ¡¾´òÓ¡±¾Ò³¡¿ ¡¾¹Ø±Õ´°¿Ú¡¿

¹ØÓÚÎÒÃÇ / ¸øÎÒÁôÑÔ / °æȨ¾Ù±¨ / Òâ¼û½¨Òé / ÍøÕ¾±à³ÌQQȺ   
Copyright ©2003- 2024 Lihuasoft.net webmaster(at)lihuasoft.net ¼ÓÔØʱ¼ä 0.00197