I've multiples CheckBoxes named "CB_0", "CB_1", "CB_2" and so far... I'm trying to change their "Checked" state, but "Controls" doesn't recognize the "Checked" property.
My line of code is like this:
Dim i As Integer = 0
Controls($"CB_{i}").Checked = True
It doesn't works, but if I use this:
CB_0.Checked = True
It works, how can I fix that?
Note:
If I try to change it text, it works:
Dim i As Integer = 0
Controls($"CB_{i}").Text = "Hello"
Me.ChildControls(Of CheckBox)().Single(Function(c) c.Name = $"CB_{i}")).Text = "Hello"