Private Sub Command1_Click()
Text3.Text = trans(Val(Text1.Text), Val(Text2.Text))
End Sub
Function trans(n As Long, b As Integer) As String
Dim hex As String
hex = "0123456789ABCDEF"
Do
r = n Mod b
n = n \ b
trans = Mid(hex, r + 1, 1) + trans
Loop Until n = 0
End Function
Private Sub Command2_Click()
End
End Sub
r = n Mod n 改为 r=n Mod b