Private Sub Command1_Click() Dim i As Integer Dim check As Control For Each check In Me.Controls If check.Value = 1 Then i = i + 1 End If Next check MsgBox i End Sub
我试过了: Private Sub Command1_Click() Dim i As Integer Dim checktotal As Integer checktotal = 0 For i = 1 To 6 If check(i).Value = True Then checktotal = checktotal + 1 End If Next End Sub 关键是第6行中check(i)中的"i"怎么和check1 check2 check3.....中的"1,2,3..."对应不会.