1个回答
展开全部
Private Sub CommandButton1_Click()
If Not IsNumeric(UserForm1.TextBox1.Text) Or Not IsNumeric(UserForm1.TextBox2.Text) Then
MsgBox "不是合法字符"
Exit Sub
End If
If UserForm1.TextBox1.Text * 1 > UserForm1.TextBox2.Text * 1 Then MsgBox "第一个数值较大"
If UserForm1.TextBox1.Text * 1 < UserForm1.TextBox2.Text * 1 Then MsgBox "第二个数值较大"
If UserForm1.TextBox1.Text * 1 = UserForm1.TextBox2.Text * 1 Then MsgBox "数值相等"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询