7,762
社区成员
发帖
与我相关
我的任务
分享
Private Sub Check1_Click(Index As Integer)
If Index = 0 Then
If Check1(0).Value = 1 Then
Check1(1).Value = 0
Check1(2).Value = 0
Else
If Check1(1).Value = 1 Then
Check1(0).Value = 0
Check1(2).Value = 0
Else
If Check1(2).Value = 1 Then
Check1(0).Value = 0
Check1(1).Value = 0
End If
End If
End If
End If
If Index = 1 Then
If Check1(1).Value = 1 Then
Check1(0).Value = 0
Check1(2).Value = 0
Else
If Check1(0).Value = 1 Then
Check1(1).Value = 0
Check1(2).Value = 0
Else
If Check1(2).Value = 1 Then
Check1(0).Value = 0
Check1(1).Value = 0
End If
End If
End If
End If
If Index = 2 Then
If Check1(2).Value = 1 Then
Check1(1).Value = 0
Check1(0).Value = 0
Else
If Check1(1).Value = 1 Then
Check1(0).Value = 0
Check1(2).Value = 0
Else
If Check1(0).Value = 1 Then
Check1(2).Value = 0
Check1(1).Value = 0
End If
End If
End If
End If
End Sub
Private Sub Command1_Click()
Dim m As Integer
For i = 0 To 3
If Option1(i).Value Then
m = 1
ElseIf Option2(i).Value Then
m = 3
ElseIf Option3(i).Value Then
m = 5
Else
m = 0
End If
sum = sum + m
Next i
Debug.Print sum
End Sub