Use the Asc() function to convert a character to its numerical representation : Char « Data Type Functions « VBA / Excel / Access / Word






Use the Asc() function to convert a character to its numerical representation

 
Sub ascDemo()
    Dim num1 As Integer
    num1 = Asc("A")
End Sub

 








Related examples in the same category

1.Use the Chr() and Asc() functions to convert between the numerical and string representations of VBA's character code set
2.Selected Characters from VBA's Character Code Set