[FONT=Arial]Function B36ToDec(B36Str)[/FONT]
[FONT=Arial]NumSize = 7 'this is the maximum length of the input string[/FONT]
[FONT=Arial]Dim Temp()[/FONT]
[FONT=Arial]Dim Final()[/FONT]
[FONT=Arial]ReDim Temp(NumSize)[/FONT]
[FONT=Arial]ReDim Final(NumSize)[/FONT]
[FONT=Arial]Sum = 0[/FONT]
[FONT=Arial]B36Set = "0123456789abcdefghijklmnopqrstuvwxyz"[/FONT]
[FONT=Arial]For i = 1 To NumSize[/FONT]
[FONT=Arial] Temp(i) = InStr(B36Set, Mid(B36Str, i, 1)) - 1[/FONT]
[FONT=Arial] Final(i) = Temp(i) * 36 ^ (NumSize - i)[/FONT]
[FONT=Arial] Sum = Sum + Final(i)[/FONT]
[FONT=Arial]' MsgBox (Str(i) + ", " + Mid(B36Str, i, 1) + ", " + Str(Sum))[/FONT]
[FONT=Arial]Next i[/FONT]
[FONT=Arial]B36ToDec = Sum[/FONT]
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>[FONT=Arial] [/FONT]</o:p>
[FONT=Arial]End Function[/FONT]