阿拉伯数字转换成英文大写.pdfVIP

  • 49
  • 0
  • 约4.89千字
  • 约 4页
  • 2022-04-20 发布于中国
  • 举报
启动 Microsoft Excel。 按 Alt+F11 启动 Visual Basic 编辑器。 在“插入”菜单上,单击“模块”。 在模块表中键入下面的代码。 Option Explicit Main Function Function SpellNumber(ByValMyNumber) Dim Dollars, Cents, Temp Dim DecimalPlace, Count ReDimPlace(9) As String Place(2) = Thousand Place(3) = Million Place(4) = Billion Place(5) = Trillion String representation of amount. MyNumber = Trim(Str(MyNumber)) Position of decimal place 0 if none. DecimalPlace = InStr(MyNumber, .) Convert cents and set MyNumber to dollar amount. If DecimalPlace 0 Then Cents = GetTens(Left(Mid(MyNumber,

文档评论(0)

1亿VIP精品文档

相关文档