How about ...:
vb Code:
If GrandChildControl.name.Contains("Exclude") Then
Dim cb = Directcast(GrandCHildControl, Elegant.Ui.CheckBox)
If cb.Checked = CheckedState.Checked Then...
End If
End If
Or
vb Code:
If GrandChildControl.name.Contains("Exclude") Then
If Directcast(GrandCHildControl, Elegant.Ui.CheckBox).Checked = CheckedState.Checked Then ...
End If
End If
Syntax may be off as I typed it in NotePad.
Note, you don't need an index as you already iterating the CheckBox's named Exclude, and in this case there would br four.