How do I convert char into integer in Excel VBA?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I am trying to do a little programming exercise with Excel VBA, I have
seen the way that converting integer into char and I want to try the way that
converting char into integer. I was using Int() as the converter... but after
I have seen the spec and I noticed that I was wrong of using this function.
I tried to subtract the char with 64, well... stupit me and the type was
not match LOL. So that, is it possible to convert char into int in any other
way?

Thanks
 
Sub test()
MsgBox Asc("a")
End Sub

will display 97 that is the ASCII integer for "a".
Do NOT do this in the spreadsheet: =ASC("a")
 
Back
Top