For k = 0 To 4
If Method(k).Value = Checked Then
***********************
end if
next我有5个checkbox:method(0)、method(1)、method(2)、method(3)、method(4)
我上面判断它是不是被选中的,不管我选择了几个,程序运行if语句总是假的,
也就是说的我的if语句写的不对,我是新手,请高手指点,急,线上等
If Method(k).Value = Checked Then
***********************
end if
next我有5个checkbox:method(0)、method(1)、method(2)、method(3)、method(4)
我上面判断它是不是被选中的,不管我选择了几个,程序运行if语句总是假的,
也就是说的我的if语句写的不对,我是新手,请高手指点,急,线上等
If Method(k).Value = 1 Then
***********************
end if
next
Dim IntNum As Integer
Dim i As Integer
i = 0
For IntNum = 0 To 4If Me.Check(IntNum).Value = 1 Then
i = i + 1
End If
Next
If i <> 0 Then
MsgBox "Checkbox have checked!"
End If
End Sub
我没看出和楼主的有什么不同的,可以运行
代码是没错的