将金额数字转换汉字大写
时 间:2004-11-10 00:00:00
作 者:yuab ID:61 城市:岳阳
摘 要:将金额数字转换汉字大写的VBA程序
正 文:
Public Function AAA(number As Variant) As String If (IsNull(number)) Then AAA = "错误:传入负值或Null值" Else Select Case number Case 0: AAA = "零" Case 1: AAA = "壹" Case 2: AAA = "贰" Case 3: AAA = "叁" Case 4: AAA = "肆" Case 5: AAA = "伍" Case 6: AAA = "陆" Case 7: AAA = "柒" Case 8: AAA = "捌" Case 9: AAA = "玖" Case 10 ^ 1: AAA = "分" Case 10 ^ 2: AAA = "角" Case 10 ^ 3: AAA = "元" Case 10 ^ 4, 10 ^ 8, 10 ^ 12: AAA = "拾" Case 10 ^ 5, 10 ^ 9, 10 ^ 13: AAA = "佰" Case 10 ^ 6, 10 ^ 10, 10 ^ 14: AAA = "仟" Case 10 ^ 7: AAA = "萬" Case 10 ^ 11: AAA = "亿" End Select End If End Function
Public Function abc(number As Variant, canshu As Long) As String A = Int(number * 100 + 0.5) 常见问答:技术分类:相关资源:源码示例
学习心得最新文章
|