For Each Control As Control In GroupBox3.Controls If TypeOf Control Is CheckBox Then AddHandler directcast(Control,checkbox).CheckedChanged, AddressOf control_CheckedChanged End If Next