You're after the 'ord' function. From the help file: int ord ( string string ) Returns the ASCII value of the first character of string. This function complements chr(). Hope this helps...