Private Sub Command1_Click() Dim N As Integer, K As Integer N = 36: K = 5 Print Trans(N, K) End Sub Private Function Trans(N As Integer, K As Integer) As String Dim R As Integer If N <> 0 Then R = N Mod K If R < 10 Then Trans = Trans(N \ K, K) & R Print N Else Trans = Trans(N \ K, K) & Chr(55 + R) End If End If End Function