我想将所有选中的索引保存在表单中的所有checkedlistbox中,但是当我点击提交按钮时没有任何反应
Private Sub cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click
Dim str As String
For Each c As Control In Me.tabPage1.Controls
If TypeOf c Is CheckedListBox Then
str = CType(c, CheckedListBox).SelectedIndex
ListBox2.Items.Add(str)
End If
Next c
End Sub