计算公式代码中文翻译英语

更新时间:2023-05-14 01:28:59 阅读: 评论:0

Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)桃花的特征
实习鉴定评语Dim Dollars, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String reprentation of amount.
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert cents and t MyNumber to dollar amount.
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _                  "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars        If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
El
MyNumber = ""
End If
Count = Count + 1
Loop
Select Ca Dollars
Ca ""
Dollars = "No Dollars"
Ca "One"
Dollars = "One Dollar"
Ca El
Dollars = Dollars & " Dollars"
End Select
Select Ca Cents
Ca ""
Cents = " and No Cents"
Ca "One"
Cents = " and One Cent"
Ca El
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dollars & Cents
End Function盐源玛瑙有收藏价值吗
' Converts a number from 100-999 into text期中考试试卷
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) <> "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
龙袍
El
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function邓家林
' Converts a number from 10 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = ""          ' Null out the temporary function value.    If Val(Left(TensText, 1)) = 1 Then  ' If value         Select Ca Val(TensText)
Ca 10: Result = "Ten"
Ca 11: Result = "Eleven"
Ca 12: Result = "Twelve"
Ca 13: Result = "Thirteen"
Ca 14: Result = "Fourteen"
Ca 15: Result = "Fifteen"
Ca 16: Result = "Sixteen"
Ca 17: Result = "Seventeen"
Ca 18: Result = "Eighteen"
Ca 19: Result = "Nineteen"
Ca El
End Select
El                                ' If value         Select Ca Val(Left(TensText, 1))
Ca 2: Result = "Twenty "
Ca 3: Result = "Thirty "
Ca 4: Result = "Forty "
Ca 5: Result = "Fifty "
Ca 6: Result = "Sixty "
Ca 7: Result = "Seventy "
Ca 8: Result = "Eighty "
Ca 9: Result = "Ninety "
Ca El
End Select
Result = Result & GetDigit _
(Right(TensText, 1))  ' Retrieve ones place.    End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
儿童智力题Function GetDigit(Digit)
Select Ca Val(Digit)
护肤品哪个牌子比较好Ca 1: GetDigit = "One"
Ca 2: GetDigit = "Two"
Ca 3: GetDigit = "Three"
Ca 4: GetDigit = "Four"
Ca 5: GetDigit = "Five"
Ca 6: GetDigit = "Six"
Ca 7: GetDigit = "Seven"
Ca 8: GetDigit = "Eight"
Ca 9: GetDigit = "Nine"
Ca El: GetDigit = ""
End Select
End Function
徐彩玉 2011-7-17 16:35:13
我发给你的表格中已经插入代码,里面有模块

本文发布于:2023-05-14 01:28:59,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/895079.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:代码   盐源   特征   鉴定
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图