Apparently i got it wrong in the second if condition of the loop, i leave a picture for better understanding.
For some reason the error is not displayed in the first if condition even tho they are pretty much the same.
To put this in context i have a big first textbox and other 9 small ones. Basically i want to send the value i write in the big textbox to the small ones one by one.
Big TextBox name attribute is t0 while the others go from t1 to t9
VISUAL BASIC CODE
Public Class Form1
Dim array() As TextBox = {t1, t2, t3, t4, t5, t6, t7, t8, t9}
Private Sub t0_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles t0.KeyDown
If e.KeyCode = Keys.Enter Then
If sender.Text.ToString <> String.Empty Then
For indice As Integer = 0 To array.Length - 1
If array(indice).Text = String.Empty Then '<== The error is in this line
array(indice).Text = sender.Text.ToString
Exit For
End If
Next
End If
End If
End Sub
End Class
UPDATE
Used equals this time but still the same error
