Dim a1 As WinForm.CheckBox = e.Form.Controls("CheckBox1") Dim a2 As WinForm.CheckBox = e.Form.Controls("CheckBox2") Dim a3 As WinForm.CheckBox = e.Form.Controls("CheckBox3") Dim vs() As String = {"Y","N","N"} Dim ks() As object = {a1,a2,a3} For l As Byte = 0 To 2 If vs(l) = "Y" Then ks(l).checked = True Else ks(l).checked = False End If Next