【发布时间】:2016-03-02 00:55:14
【问题描述】:
我正在尝试使用 Excel VBA 编写一个函数来将字符串转换为其各自的 ASCII 数字。例如:
"ABCD" => "65666768"
我已经编写了这段代码,但它无法进行转换:
Public Function asciien(s As String) As String
' Returns the string to its respective ascii numbers
Dim i As Integer
For i = 1 To Len(s)
asciien = asciien & CStr(Asc(Mid(s, x, 1)))
Next i
End Function
【问题讨论】: