VB中点击“全选”命令按钮,N个复选框都选中。点击“取消”命令按钮,N个复选框都取消。

一定要全部的代码!
2024-12-02 15:27:02
推荐回答(1个)
回答1:

先画一个复选框组check1(0),check1(1),check1(2),
画几个根据情况定:
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To 2
Check1(i).Value = 1
Next i
End Sub

Private Sub Command2_Click()
Dim i As Integer
For i = 0 To 2
Check1(i).Value = 0
Next i
End Sub