I am trying to change different values in a for loop in vb.net. However, I couldn't find how to change the numbered boolean variables.
Dim txt1 As Boolean = False
Dim txt2 As Boolean = False
i = i + 1
If i < 9 Then
'I tried to do:
Me.Controls("txt" & i.ToString) = True
txt(i) = True
End If
How can I change the numbered boolean variables and what is the most efficient way to it?