将金额数字转换汉字大写
作 者:yuab
摘 要:将金额数字转换汉字大写的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) |
(责任编辑:admin)
- ·关于 Partition 函数在分组查询中的应
- ·Access算术运算符的含义和说明表
- ·mid函数的另类用法
- ·access制作程序运行进度框
- ·Function与Sub的异同(函数调用)
- ·Access判断某个数值是否为某个数据类型
- ·select case后面语句块的值的四种格式
- ·vba条件语句的两种表示方法
- ·Access几种数据类型初始化的值
- ·Access vba null与""空字符串的区别
- ·access vba 数据类型表
- ·Access变量的命名规则
- ·Access中EXIT Sub与End Sub的区别
- ·Access vba中参数前关键字ByRef和ByVal
- ·Access列表框快速全选的技巧【最快】
- ·vba函数的数据类型强制转换