求助:复选框的问题
窗体有N个复选框,如何判断有几个被选中并向MSHFlexGrid添加几列。
Dim a, y
a = 1
y = 0
For i = 0 To 3
If Check1(i).Value = 1 Then
Text1.Text = a
'a = Text1.Text
Text2(i).Text = Check1(i).Caption
With MSHFlexGrid1
MSHFlexGrid1.Rows = 151: MSHFlexGrid1.Cols = a
MSHFlexGrid1.TextMatrix(0, y) = Check1(i).Caption
End With
a = a + 1
y = a - 1
Else
Text2(i).Text = ""
'a = 0
End If
Next
各位大佬如有好的建议,请多多指点一二
[此贴子已经被作者于2022-9-20 06:41编辑过]