数字字符串互转
Sub sample() Dim a As String a = 10 Debug.Print a Dim b As Integer b = CInt(a) b = a + 1 Debug.Print b End Sub
ASCII 和 字符互转
Sub sample() Dim str As String Dim ascCode As Integer str = "A" ascCode = Asc(str) Debug.Print Asc(str) str = Chr(ascCode + 1) Debug.Print str End Sub