Private Const char = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Function Base10N(ByVal Value As Long, ByVal Base As Long) As String
Dim v1 As Long
If (Base < 2) Then Exit Function
If (Base > 36) Then Exit Function
Do
v1 = (Value Mod Base)
Value = Int(Value / Base)
Base10N = Mid$(char, 1 + v1, 1) & Base10N
Loop While Value > 0
End Function
Function BaseN10(ByVal Value As String, ByVal Base As Long) As Long
Dim v2 As Long
Dim i As Long
Dim j As Long
If (Base < 2) Then Exit Function
If (Base > 36) Then Exit Function
For i = Len(Value) To 1 Step -1
v2 = InStr(1, char, Mid$(Value, i, 1)) - 1
If v2 < 0 Then Exit Function
If v2 >= Base Then Exit Function
For j = 1 To (Len(Value) - i)
v2 = v2 * Base
Next
BaseN10 = BaseN10 + v2
Next
End Function