vb中if语句套用总是提示错误

来源:百度知道 编辑:UC知道 时间:2024/06/21 17:15:20
If Option15.Value = True Then
Label10.Caption = Val(Label3.Caption) + 0.6
Label12.Caption = Val(Label5.Caption) + 0.6
Label14.Caption = Val(Label7.Caption) + 0.9
End If
If Option16.Value = True Then
Label10.Caption = Val(Label3.Caption) + 0.3
Label12.Caption = Val(Label5.Caption) + 0.3
Label14.Caption = Val(Label7.Caption) + 0.6
End If
If Option17.Value = True Then
Label10.Caption = Val(Label3.Caption) + 0.5
Label12.Caption = Val(Label5.Caption) + 0.5
Label14.Caption = Val(Label7.Caption) + 0.8
End If
If Option18.Value = True Then
Label10.Caption = Val(Label3.Caption) + 0.9
Label12.Caption = Val(Label5.Caption) + 0.9
Label14.Caption = Val(Label7.Caption) + 1.6
End If
If Option19.Value = True Then
Label10.Caption = Val(Label3.Caption) + 0.8
Label12.Caption = Val(Label5.Caption) + 0.8
Lab

语法确实没有错误,是不是有个别label的caption 不能转化为数字,最好将提示的什么错误发上来。

语法没有错误 是不是你添加的控件有问题 找不到控件

没什么错误,可能是你输入的数据类型有错误。