参数说明:
BitNo:元是0,往左依次为1、2、3、4、5……,往右(也就是小数点后)依次为-1、-2……
Money:钱的数量,单位为元。
Public Function GetBit(BitNo As Long, Money As Double) As String
Dim BitCount As Long
BitCount = Int(Log(Money) / Log(10#) + 0.000000000001) + 1
Select Case BitNo
Case Is > BitCount:
GetBit = ""
Case Is = BitCount:
GetBit = "¥"
Case Is < BitCount:
Dim tmp As Long
tmp = Int(Money / 10 ^ BitNo + 0.000000000001)
tmp = tmp - Int(tmp / 10) * 10
GetBit = Choose(tmp + 1, "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖")
End Select
End Function