我有一个字符串,我想将每个字符转换为适当的ASCII字符。
Sub IterateCharactersObject()
Dim ch As Characters, n As Long
With ThisWorkbook.Sheets("Sheet1").Range("A1")
For n = 1 To .Characters.Count
Set ch = .Characters(n, 1)
Debug.Print ch.Text & ", " & Asc(ch) '<-- what should go in place of Asc(ch)?
Next n
End With
End Sub
不确定我要查找的功能,似乎找不到。
如果我的字符串以“ A big ....”开头,则
n= 1
输出为A, 65
n= 2
输出为, 32
我本质上是在VBA中寻找Chr()
函数的反函数