- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
用于将数字换汉字大写数字的函数
Function zhh(mrmbze)Dim S_1 As StringDim S_2 As StringDim S_4 As StringDim s_5 As StringDim S_6 As StringDim S_7 As StringDim I As IntegerDim tn As Single
S_1 = 零壹贰叁肆伍陆柒捌玖S_2 = 仟佰拾万仟佰拾元角分
转自:Access中国作者:Benjamin_luk代码:Option Compare DatabaseOption Explicit
Function CWord(myNumber As Double) As StringDim str1 As String, str2 As String, str3 As String, str4 As String, str5 As String, str6 As String, str7 As StringDim I As Integer, J As Integer, K As Integer, L As Integerstr1 = 仟佰拾亿仟佰拾万仟佰拾元角分str2 = 元角分str3 = 零壹贰叁肆伍陆柒捌玖str4 = Left(Trim(Format(myNumber, 0.00)), Len(Format(myNumber, 0.00)) - 3) Right(Trim(Format(myNumber, 0.00)), 2)str5 = Right(Trim(Format(myNumber, 0.00)), 2)str6 = Right(str1, Len(str4))For I = 1 To Len(str4)K = CDbl(Mid(str4, I, 1))str7 = str7 Mid(str3, K + 1, 1) Mid(str6, I, 1)Next ICWord = str7 整End FunctionFunction ctest()MsgBox CWord(120001.03)End Function
S_4 = Ltrim(Str(Nz(Int(mrmbze * 100))))
If Len(S_4) 10 And mrmbze 0 And mrmbze 99 Then
??tn = Int(mrmbze * 100) / 100??????If mrmbze - tn = 0.005 Then
?????? tn = tn + 0.01
????End If??S_4 = Ltrim(Str(tn * 100))
??End If
If Len(S_4) 10 Or mrmbze 0 Then
zhh = ERROR!!! The number to be transferred CANNOT be negative and must be less than99
Else
S_4 = String(10 - Len(S_4), ) + S_4I = 1zhh = Do While I = 10????s_5 = Mid(S_4, I, 1)????If s_5 Then????????S_6 = Mid(S_1, Val(s_5) + 1, 1)????????S_7 = Mid(S_2, I, 1)????????If s_5 = 0 And I 4 And I 8 Then????????????S_7 = ????????????????????End If????????If (Mid(S_4, I, 2) = 00) Or (s_5 = 0 And (I = 4 Or I = 8 Or I = 10)) Then????????????S_6 = ????????????????????End If????????zhh = zhh + S_6 + S_7????????????????If Mid(S_4, I, 1) = 0 And Mid(S_4, I + 1, 1) 0 And (I = 4 Or I = 8) Then????????????zhh = zhh + 零????????End If????End If????I = I + 1LoopIf s_5 = 0 Then????zhh = zhh + 整End IfEnd If
If zhh Like * 元零 * 角 * Then????zhh = Replace(zhh
您可能关注的文档
最近下载
- 【机构秘籍】小学奥数题库《几何》-直线型-鸟头模型-0星题(含解析)全国通用版.doc VIP
- 浙大单片机导论实验报告.doc
- kuka机器人_KR30-3各轴分解图以及保养.pdf
- 人力行政部OGSM计划.pptx
- 中国哲学史简答题和论述题.doc
- 作业11:《windows服务器基础配置与局域网组建》工学一体化课程教学进度计划表.docx VIP
- 【机构秘籍】小学奥数题库《几何》-直线型-一半模型-2星题(含解析)全国通用版.doc VIP
- 第2章、房屋建筑制图统一标准和基本技能(2014-12).ppt
- 山西师范大学2022-2023学年《植物生理学》期末考试试卷(A卷)含参考答案.docx
- 水电水利工程基本词汇对照表(法语).docx
文档评论(0)