新手:下面程序我运行时只要输入非十六进制数点击对话框后就会出错
Private Sub Command1_Click()Dim x As Integer
Dim Y As String
Dim I As Long
Dim C As Boolean
Dim text0 As String
If (Combo1.Text = "十六进制转十进制") Then
Text1 = UCase(Text1)
If Len(Text1) <> 0 Then
For I = 1 To Len(Text1)
text0 = Mid(Text1, Len(Text1) + 1 - I, 1)
If C = Not (text0 Like "*[!0-9A-Fa-f]*") Then
x = MsgBox("请输入十六进制数!", vbOK)
If x = vbOK Then
Cancel = -1
End If
Text1 = ""
Text3 = ""
End If
Next I
AA = HEX_to_DEC(Text1)
Text3 = Val(AA)
End If
ElseIf (Combo1.Text = "十进制转十六进制") Then