vb中Check的Value属性是什么意思
PrivateSubopt1_Click(IndexAsInteger)Ifopt1(0).Value=TrueThenFori=0To31Check1(i).Value...
Private Sub opt1_Click(Index As Integer)
If opt1(0).Value = True Then
For i = 0 To 31
Check1(i).Value = 1
Next
Else
For i = 0 To 31
Check1(i).Value = 0
Next
End If
End Sub方便的话帮我解释下这段代码吧 谢谢!! 展开
If opt1(0).Value = True Then
For i = 0 To 31
Check1(i).Value = 1
Next
Else
For i = 0 To 31
Check1(i).Value = 0
Next
End If
End Sub方便的话帮我解释下这段代码吧 谢谢!! 展开
1个回答
展开全部
check是选项控件(打勾)
value是指是否被选中
true(非零)是被选中
Private Sub opt1_Click(Index As Integer)
If opt1(0).Value = True Then '选项(点)被选中
For i = 0 To 31
Check1(i).Value = 1 '选项控件数组的值为被选中
Next
Else
For i = 0 To 31
Check1(i).Value = 0 '选项控件数组的值为不被选中
Next
End If
value是指是否被选中
true(非零)是被选中
Private Sub opt1_Click(Index As Integer)
If opt1(0).Value = True Then '选项(点)被选中
For i = 0 To 31
Check1(i).Value = 1 '选项控件数组的值为被选中
Next
Else
For i = 0 To 31
Check1(i).Value = 0 '选项控件数组的值为不被选中
Next
End If
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询