Don't know what all that code is for, but you just use:
Dim i As Integer = Asc("S")
The Convert.ToInt32 etc. are using to take a string that contains a number (ie, "25") and returns the numeric representation (25).
[EDIT]Added by LOSMAC ;)[/EDIT]
Dim i As Integer = 0
Dim sString As String = "Hello Word!"
For i = 0 To sString.Length - 1
MsgBox(sString.Substring(i, 1) & " = " & Asc(sString.Substring(i, 1)), MsgBoxStyle.Information, sString)