Private Sub Command1_Click()
Dim n As Integer, y As Integer
n = InputBox("请输入已知是几进制数:")
s = InputBox("请输入这个数:")
For i = 1 To Len(s)
c = Mid(s, i, 1)
If c >= "0" And c <= Mid("123456789", i, 1) Then
y = y * n + Asc(c) - 48
Else
MsgBox (n & "进制数中不可能有" & c & "!")
Exit Sub
End If
Next i
MsgBox ("(" & s & ")" & n & "=" & y)
End Sub
有的,我有这个,哒,感兴趣的话可以看点我头象~……了解一下