你的问题解答 MsgBox Hex(Asc("国"))此时值是16进制的要转换成10进制 用函数 Private Function YtoX(ByVal x, ByVal y As Integer) As Variant Dim s, Z% For i = 0 To Len(CStr(x)) - 1 If UCase(Mid(CStr(x), Len(CStr(x)) - i, 1)) = "A" Then Z = 10 ElseIf UCase(Mid(CStr(x), Len(CStr(x)) - i, 1)) = "B" Then Z = 11 ElseIf UCase(Mid(CStr(x), Len(CStr(x)) - i, 1)) = "C" Then Z = 12 ElseIf UCase(Mid(CStr(x), Len(CStr(x)) - i, 1)) = "D" Then Z = 13 ElseIf UCase(Mid(CStr(x), Len(CStr(x)) - i, 1)) = "E" Then Z = 14 ElseIf UCase(Mid(CStr(x), Len(CStr(x)) - i, 1)) = "F" Then Z = 15 Else Z = CInt(Mid(CStr(x), Len(CStr(x)) - i, 1)) End If s = s + Z * (y ^ i) Next i YtoX = s End Function