On my keyboard, the characters from 33 to 126 are keyboard characters, accented characters are from 128 to 150, so except for CHR$(127) they just follow in order.
SELECT CASE may be your best bet with sorting out all the oddball ASCII values. For example:
SELECT CASE ASC(Char$)
CASE 32: PRINTX% = PRINTX% + Array(1)
CASE 33 TO 126: index% = (ASC(Char$) - 33) * Array(0) + 2
CASE ... etc.
In any event, it's difficult to help when you are dealing with circumstances that we don't encounter -- different keyboards, extended character sets, etc.