vb 实时错误424帮忙看看

来源:百度知道 编辑:UC知道 时间:2024/06/06 08:22:22
Private Sub AddOption_Click()
SymbelLabel.Caption = "+"
OutputText = ""
End Sub

Private Sub DivideOption_Click()
SymbelLabel.Caption = "/"
OutputText = ""
End Sub

Private Sub MinusOption_Click()
SymbelLabel.Caption = "-"
OutputText = ""
End Sub

Private Sub multiOption_Click()
SymbelLabel.Caption = "*"
OutputText = ""
End Sub

Private Sub RunCommand_Click()
Dim Number1, Number2, Result As Single
Number1 = Val(inputText1.Text)
Number2 = Val(InputText2.Text)

If AddOption.Value = True Then
Result = Number1 + Number2
End If
If MiunsOption.Value = True Then
Result = Number1 - Number2
End If
If multiOption.Value = True Then
Result = Number1 * Number2
End If
If DivideOption.Value = True Then
If Number2 = 0 Then
MsgBox "除数不能为0&quo

424是要求对象,你是不是什么控件没有添加呢,或者是控件名字写错了,到错误提示的行去仔细检查。

问题补充:黄色选中"If MiunsOption.Value = True Then"
MiunsOption写错了,是 MinusOption

VAL(InputText2.Text)在哪里 ?
用ELSE if