L
Leon
I have a program that fill 6 textbox on button click, but when using TypeOf
my program is trying to also fill label controls which throws my array out
of range. how can use TypeOf to only read textbox Control?
Piece of Code:
Dim I As Integer
For I = 0 To Me.Controls.Count - 1
If (TypeOf Controls(I) Is TextBox) Then
Dim tbox As TextBox = CType(Controls(I), TextBox)
tbox.Text = arr1(I)
End If
Next
my program is trying to also fill label controls which throws my array out
of range. how can use TypeOf to only read textbox Control?
Piece of Code:
Dim I As Integer
For I = 0 To Me.Controls.Count - 1
If (TypeOf Controls(I) Is TextBox) Then
Dim tbox As TextBox = CType(Controls(I), TextBox)
tbox.Text = arr1(I)
End If
Next