
因为checkbox默认的 *** 作是点一次选中,点两次取消选中,所以要修改代码,加一个布尔变量标记
修改后的代码如下:
Dim flag As BooleanPrivate Sub CheckBox1_Click()
flag = False
If flag = False Then
CheckBox1.Value = 1
瞎铅 CheckBox2.Value = 0
CheckBox3.Value = 0
CheckBox4.Value = 0
慎简 flag = True
End If
End Sub
Private Sub CheckBox2_Click()
If flag = True Then
CheckBox1.Value = 0
CheckBox2.Value = 1
CheckBox3.Value = 0
CheckBox4.Value = 0
flag = False
End If
End Sub
Private Sub CheckBox3_Click()
If flag = False Then
CheckBox1.Value = 0
CheckBox2.Value = 0
CheckBox3.Value = 1
宽神裤 CheckBox4.Value = 0
flag = True
End If
End Sub
Private Sub CheckBox4_Click()
If flag = True Then
CheckBox1.Value = 0
CheckBox2.Value = 0
CheckBox3.Value = 0
CheckBox4.Value = 1
flag = False
End If
End Sub
第二行第2列 圆圈一点就是配袭拆单选属性是固定的 只能设置不能添加 选中禅猜控件 在属性栏中设置 或者在代码中培枣如:
option1.value=true
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)