Private Sub Command1_Click()
Me.Font.Size = 30
Print shiliujinzhi(230)
End Sub
Private Function shiliujinzhi(m As Byte) As String
Dim n As Byte
n = m
Const shiliu As Byte = 16
Dim returnS As String
Dim shang As Byte
Dim yushu(1 To 9) As Byte
Dim i As Byte
i = UBound(yushu)
shang = n \ shiliu
yushu(i) = n Mod shiliu
returnS = returnS & yushu(i)
While shang <> 0
i = i - 1
n = shang
shang = n \ shiliu
yushu(i) = n Mod shiliu
returnS = yushu(i) & returnS
Wend
shiliujinzhi = returnS
Print Hex(230)
End Function
Me.Font.Size = 30
Print shiliujinzhi(230)
End Sub
Private Function shiliujinzhi(m As Byte) As String
Dim n As Byte
n = m
Const shiliu As Byte = 16
Dim returnS As String
Dim shang As Byte
Dim yushu(1 To 9) As Byte
Dim i As Byte
i = UBound(yushu)
shang = n \ shiliu
yushu(i) = n Mod shiliu
returnS = returnS & yushu(i)
While shang <> 0
i = i - 1
n = shang
shang = n \ shiliu
yushu(i) = n Mod shiliu
returnS = yushu(i) & returnS
Wend
shiliujinzhi = returnS
Print Hex(230)
End Function