2 回答

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超7個(gè)贊
一.在checkbox1的更新后事件:
if checkbox1=-1 then checkbox2=-1 checkbox3=-1 checkbox4=-1 else checkbox2=0 checkbox3=0 checkbox4=0 end if |
二.在checkbox2、3、4的更新后事件:
if checkbox2=-1 and checkbox3=-1 and checkbox4=-1 then checkbox1=-1 else checkbox1=0 end if |

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超3個(gè)贊
Private
Sub
CheckBox1_Click()
If
CheckBox1
Then
CheckBox2.Value =
True
CheckBox3.Value =
True
CheckBox4.Value =
True
Else
CheckBox2.Value =
False
CheckBox3.Value =
False
CheckBox4.Value =
False
End
If
End
Sub
Private
Sub
CheckBox2_Click()
If
CheckBox2
Then
If
CheckBox3
And
CheckBox4
Then
CheckBox1.Value =
True
Else
If
Not
CheckBox3
And
Not
CheckBox4
Then
CheckBox1.Value =
False
End
If
End
Sub
Private
Sub
CheckBox3_Click()
If
CheckBox3
Then
If
CheckBox2
And
CheckBox4
Then
CheckBox1.Value =
True
Else
If
Not
CheckBox2
And
Not
CheckBox4
Then
CheckBox1.Value =
False
End
If
End
Sub
Private
Sub
CheckBox4_Click()
If
CheckBox4
Then
If
CheckBox3
And
CheckBox2
Then
CheckBox1.Value =
True
Else
If
Not
CheckBox3
And
Not
CheckBox2
Then
CheckBox1.Value =
False
End
If
End
Sub
添加回答
舉報(bào)