这个程序“第三个条件怎么实现不了,就是喜欢数学英语”。。

- shanya LV.连长
- 2011/7/23 19:46:31
Private Sub Command1_Click()
If Option1.Value = True Then
If Check1.Value = 1 Then
Text1.Text = "喜欢数学"
ElseIf Check2.Value = 1 Then
Text1.Text = "喜欢英语"
ElseIf Check1.Value = 1 And Check2.Value = 1 Then
Text1.Text = "喜欢数学英语"
End If
End If
If Option2.Value = True Then
If Check1.Value = 1 Then
Text1.Text = "不喜欢数学"
ElseIf Check2.Value = 1 Then
Text1.Text = "不喜欢英语"
Else
Text1.Text = "不喜欢数学英语"
End If
End If
End Sub
If Option1.Value = True Then
If Check1.Value = 1 Then
Text1.Text = "喜欢数学"
ElseIf Check2.Value = 1 Then
Text1.Text = "喜欢英语"
ElseIf Check1.Value = 1 And Check2.Value = 1 Then
Text1.Text = "喜欢数学英语"
End If
End If
If Option2.Value = True Then
If Check1.Value = 1 Then
Text1.Text = "不喜欢数学"
ElseIf Check2.Value = 1 Then
Text1.Text = "不喜欢英语"
Else
Text1.Text = "不喜欢数学英语"
End If
End If
End Sub

- kunkunkkk
- 2011/7/23 22:33:58
vb的知识,,,哎,,,,

- 周主任
- 2011/7/24 20:00:24
ElseIf Check1.Value = 1 And Check2.Value = 1 Then
改为Else Check1.Value = 1 And Check2.Value = 1 Then
改为Else Check1.Value = 1 And Check2.Value = 1 Then

- xuhui021
- 2011/7/25 10:34:52
调整一下顺序,先判断“喜欢英语数学”,再判断英语或者数学。

- hqz8812
- 2011/7/25 18:02:49
谢谢,已解决