如何将数字转化为英文 不知道你说的转化成英文数什么意思?如果你想将数字转成十六进制可用dim strTemp as StringstrTemp= Hex(number) 'number为你想转的数字 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 dim strTemp as StringstrTemp= chr(number)??? Private Sub Command1_Click() Print Chr(65) 'AEnd Sub'本示例使用 Chr 函数来返回指定字符码所代表的字符。''Dim MyChar'MyChar = Chr(65) ' 返回 A。'MyChar = Chr(97) ' 返回 a。'MyChar = Chr(62) ' 返回 >。'MyChar = Chr(37) ' 返回 %。'?????????????????????????????? 对,同意楼上的chr(no)为asc码为no的字符 ***把数字转成英文字***'建立D2T巨集,并把快速键设为Shift + Ctrl + T。'写入程式码: Sub D2T()Dim MyStr As StringMyStr = ActiveCell.TextIf IsNumeric(MyStr) = True ThenActiveCell.Value = ""Select Case Len(MyStr)Case 1OneDG (MyStr)Case 2TwoDG (MyStr)Case 3ThreeDG (MyStr)Case 4OneDG (Left(MyStr, 1))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 5TwoDG (Left(MyStr, 2))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 6ThreeDG (Left(MyStr, 3))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 7OneDG (Left(MyStr, 1))ActiveCell.Value = ActiveCell.Value + " Millon "ThreeDG (Mid(MyStr, 2, 3))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 8TwoDG (Left(MyStr, 2))ActiveCell.Value = ActiveCell.Value + " Millon "ThreeDG (Mid(MyStr, 3, 3))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 9ThreeDG (Left(MyStr, 3))ActiveCell.Value = ActiveCell.Value + " Millon "ThreeDG (Mid(MyStr, 4, 3))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 10OneDG (Left(MyStr, 1))ActiveCell.Value = ActiveCell.Value + " Billon "ThreeDG (Mid(MyStr, 2, 3))ActiveCell.Value = ActiveCell.Value + " Millon "ThreeDG (Mid(MyStr, 5, 3))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case 11TwoDG (Left(MyStr, 2))ActiveCell.Value = ActiveCell.Value + " Billon "ThreeDG (Mid(MyStr, 3, 3))ActiveCell.Value = ActiveCell.Value + " Millon "ThreeDG (Mid(MyStr, 6, 3))ActiveCell.Value = ActiveCell.Value + " Thousand "ThreeDG (Right(MyStr, 3))Case ElseEnd SelectEnd IfEnd SubSub OneDG(MyStr As String)Select Case MyStrCase "0"If ActiveCell.Value = "" Then ActiveCell.Value = ActiveCell.Value + "Zero"Case "1"ActiveCell.Value = ActiveCell.Value + "One"Case "2"ActiveCell.Value = ActiveCell.Value + "Two"Case "3"ActiveCell.Value = ActiveCell.Value + "Three"Case "4"ActiveCell.Value = ActiveCell.Value + "Four"Case "5"ActiveCell.Value = ActiveCell.Value + "Five"Case "6"ActiveCell.Value = ActiveCell.Value + "Six"Case "7"ActiveCell.Value = ActiveCell.Value + "Seven"Case "8"ActiveCell.Value = ActiveCell.Value + "Eight"Case "9"ActiveCell.Value = ActiveCell.Value + "Nine"End SelectEnd SubSub TwoDG(MyStr As String)Select Case MyStrCase "10"ActiveCell.Value = ActiveCell.Value + "Ten"Case "11"ActiveCell.Value = ActiveCell.Value + "eleven"Case "12"ActiveCell.Value = ActiveCell.Value + "Twelve"Case "13"ActiveCell.Value = ActiveCell.Value + "Thirteen"Case "14"ActiveCell.Value = ActiveCell.Value + "Fourteen"Case "15"ActiveCell.Value = ActiveCell.Value + "Fifteen"Case "16"ActiveCell.Value = ActiveCell.Value + "Sixteen"Case "17"ActiveCell.Value = ActiveCell.Value + "Seventeen"Case "18"ActiveCell.Value = ActiveCell.Value + "Eighteen"Case "19"ActiveCell.Value = ActiveCell.Value + "Nineteen"Case ElseSelect Case Left(MyStr, 1)Case "2"ActiveCell.Value = ActiveCell.Value + "Twenty "Case "3"ActiveCell.Value = ActiveCell.Value + "Thirty "Case "4"ActiveCell.Value = ActiveCell.Value + "Forty "Case "5"ActiveCell.Value = ActiveCell.Value + "Fifty "Case "6"ActiveCell.Value = ActiveCell.Value + "Sixty "Case "7"ActiveCell.Value = ActiveCell.Value + "Seventy "Case "8"ActiveCell.Value = ActiveCell.Value + "Eighty "Case "9"ActiveCell.Value = ActiveCell.Value + "Ninety "End SelectOneDG (Right(MyStr, 1))End SelectEnd SubSub ThreeDG(MyStr As String)Select Case Left(MyStr, 1)Case "1"ActiveCell.Value = ActiveCell.Value + "One Handred "Case "2"ActiveCell.Value = ActiveCell.Value + "Two Handred "Case "3"ActiveCell.Value = ActiveCell.Value + "Three Handred "Case "4"ActiveCell.Value = ActiveCell.Value + "Four Handred "Case "5"ActiveCell.Value = ActiveCell.Value + "Five Handred "Case "6"ActiveCell.Value = ActiveCell.Value + "Six Handred "Case "7"ActiveCell.Value = ActiveCell.Value + "Seven Handred "Case "8"ActiveCell.Value = ActiveCell.Value + "Eight Handred "Case "9"ActiveCell.Value = ActiveCell.Value + "Night Handred "End SelectTwoDG Right(MyStr, 2)End Sub'上面的程式码可以处理到11位数。'随意输入一个未超过11位数的数字,然后把输入游标移到该Cell里。'一同按下 Shift + Ctrl + T。'注:不是我本人的东东 EXCEL 如何取得当前系统的时间 谢谢 一个VC程序翻译成VB telnet的程序的问题 怎么自定义CommonDialog1里的ShowFont? 高分求数据采集代码 vb中执行access查询的问题 请问接口里可不可以定义事件? 谁有公交ic卡管理系统的毕业设计 基于VB的 请教SQL语句 调查一下VB程序员都有什么爱好? 不是程序,但比那个难办多了!帮帮我~ 如何在VB中打开一个.doc文件.(在windows2000环境下) 请教一个问题?
strTemp= chr(number)
???
Print Chr(65) 'A
End Sub
'本示例使用 Chr 函数来返回指定字符码所代表的字符。
'
'Dim MyChar
'MyChar = Chr(65) ' 返回 A。
'MyChar = Chr(97) ' 返回 a。
'MyChar = Chr(62) ' 返回 >。
'MyChar = Chr(37) ' 返回 %。'??????????????????????????????
chr(no)
为asc码为no的字符
'写入程式码: Sub D2T()
Dim MyStr As String
MyStr = ActiveCell.TextIf IsNumeric(MyStr) = True Then
ActiveCell.Value = ""Select Case Len(MyStr)
Case 1
OneDG (MyStr)
Case 2
TwoDG (MyStr)
Case 3
ThreeDG (MyStr)
Case 4
OneDG (Left(MyStr, 1))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 5
TwoDG (Left(MyStr, 2))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 6
ThreeDG (Left(MyStr, 3))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 7
OneDG (Left(MyStr, 1))
ActiveCell.Value = ActiveCell.Value + " Millon "
ThreeDG (Mid(MyStr, 2, 3))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 8
TwoDG (Left(MyStr, 2))
ActiveCell.Value = ActiveCell.Value + " Millon "
ThreeDG (Mid(MyStr, 3, 3))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 9
ThreeDG (Left(MyStr, 3))
ActiveCell.Value = ActiveCell.Value + " Millon "
ThreeDG (Mid(MyStr, 4, 3))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 10
OneDG (Left(MyStr, 1))
ActiveCell.Value = ActiveCell.Value + " Billon "
ThreeDG (Mid(MyStr, 2, 3))
ActiveCell.Value = ActiveCell.Value + " Millon "
ThreeDG (Mid(MyStr, 5, 3))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case 11
TwoDG (Left(MyStr, 2))
ActiveCell.Value = ActiveCell.Value + " Billon "
ThreeDG (Mid(MyStr, 3, 3))
ActiveCell.Value = ActiveCell.Value + " Millon "
ThreeDG (Mid(MyStr, 6, 3))
ActiveCell.Value = ActiveCell.Value + " Thousand "
ThreeDG (Right(MyStr, 3))
Case Else
End Select
End If
End SubSub OneDG(MyStr As String)
Select Case MyStr
Case "0"
If ActiveCell.Value = "" Then ActiveCell.Value = ActiveCell.Value + "Zero"
Case "1"
ActiveCell.Value = ActiveCell.Value + "One"
Case "2"
ActiveCell.Value = ActiveCell.Value + "Two"
Case "3"
ActiveCell.Value = ActiveCell.Value + "Three"
Case "4"
ActiveCell.Value = ActiveCell.Value + "Four"
Case "5"
ActiveCell.Value = ActiveCell.Value + "Five"
Case "6"
ActiveCell.Value = ActiveCell.Value + "Six"
Case "7"
ActiveCell.Value = ActiveCell.Value + "Seven"
Case "8"
ActiveCell.Value = ActiveCell.Value + "Eight"
Case "9"
ActiveCell.Value = ActiveCell.Value + "Nine"
End Select
End SubSub TwoDG(MyStr As String)
Select Case MyStr
Case "10"
ActiveCell.Value = ActiveCell.Value + "Ten"
Case "11"
ActiveCell.Value = ActiveCell.Value + "eleven"
Case "12"
ActiveCell.Value = ActiveCell.Value + "Twelve"
Case "13"
ActiveCell.Value = ActiveCell.Value + "Thirteen"
Case "14"
ActiveCell.Value = ActiveCell.Value + "Fourteen"
Case "15"
ActiveCell.Value = ActiveCell.Value + "Fifteen"
Case "16"
ActiveCell.Value = ActiveCell.Value + "Sixteen"
Case "17"
ActiveCell.Value = ActiveCell.Value + "Seventeen"
Case "18"
ActiveCell.Value = ActiveCell.Value + "Eighteen"
Case "19"
ActiveCell.Value = ActiveCell.Value + "Nineteen"
Case Else
Select Case Left(MyStr, 1)
Case "2"
ActiveCell.Value = ActiveCell.Value + "Twenty "
Case "3"
ActiveCell.Value = ActiveCell.Value + "Thirty "
Case "4"
ActiveCell.Value = ActiveCell.Value + "Forty "
Case "5"
ActiveCell.Value = ActiveCell.Value + "Fifty "
Case "6"
ActiveCell.Value = ActiveCell.Value + "Sixty "
Case "7"
ActiveCell.Value = ActiveCell.Value + "Seventy "
Case "8"
ActiveCell.Value = ActiveCell.Value + "Eighty "
Case "9"
ActiveCell.Value = ActiveCell.Value + "Ninety "
End Select
OneDG (Right(MyStr, 1))
End SelectEnd SubSub ThreeDG(MyStr As String)
Select Case Left(MyStr, 1)
Case "1"
ActiveCell.Value = ActiveCell.Value + "One Handred "
Case "2"
ActiveCell.Value = ActiveCell.Value + "Two Handred "
Case "3"
ActiveCell.Value = ActiveCell.Value + "Three Handred "
Case "4"
ActiveCell.Value = ActiveCell.Value + "Four Handred "
Case "5"
ActiveCell.Value = ActiveCell.Value + "Five Handred "
Case "6"
ActiveCell.Value = ActiveCell.Value + "Six Handred "
Case "7"
ActiveCell.Value = ActiveCell.Value + "Seven Handred "
Case "8"
ActiveCell.Value = ActiveCell.Value + "Eight Handred "
Case "9"
ActiveCell.Value = ActiveCell.Value + "Night Handred "
End Select
TwoDG Right(MyStr, 2)
End Sub
'上面的程式码可以处理到11位数。
'随意输入一个未超过11位数的数字,然后把输入游标移到该Cell里。'一同按下 Shift + Ctrl + T。'注:不是我本人的东东