You're welcome. BTW, the max # is
lnBase^n - 1, where n is the size of the rersult string.
>This one does all I want. No need to use PADR() anymore. Very nice. The maximum number it supports is 456975. Thanks Sergey.
>
>>Yes, I see the problem. Try (works even for 0)
>>
>> lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>> lcCharList = lcLetters
>> lnBase = LEN(lcCharList)
>> lcVal = ""
>> FOR i=1 TO 4
>> lnRest = (lnVal % lnBase)
>> lnVal = INT( lnVal / lnBase)
>> lcVal = SUBSTR( lcCharList, lnRest + 1 , 1 ) + lcVal
>> ENDFOR
>>
>>
--sb--