2017-05-18 2 views

Répondre

0

Cela pourrait se faire avec quelque chose comme:

For i As Integer = 1 To 10 
    Dim matches() As Control = Me.Controls.Find("checkbox_" & i, True) 
    If matches.Length > 0 AndAlso TypeOf matches(0) Is CheckBox Then 
     Dim cb As CheckBox = DirectCast(matches(0), CheckBox) 
     Locations(i - 1) = IIf(cb.Checked, 1, 0) 
    End If 
Next 
+0

ont parfaitement fonctionné! Merci beaucoup! – phillip87