Quote Originally Posted by Bruce Fox View Post
How about ...:
vb Code:
  1. If GrandChildControl.name.Contains("Exclude") Then
  2.  
  3. Dim cb = Directcast(GrandCHildControl, Elegant.Ui.CheckBox)
  4. If cb.Checked = CheckedState.Checked Then...
  5.  
  6. End If
  7.  
  8. End If

Or
vb Code:
  1. If GrandChildControl.name.Contains("Exclude") Then
  2.  
  3. If Directcast(GrandCHildControl, Elegant.Ui.CheckBox).Checked = CheckedState.Checked Then ...
  4.  
  5. End If
  6.  
  7. 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.
I had tried that too before posting the thread. This doesnt work because as soon as I check one checkbox for Exclude, the messagebox comes up.