Hello everyone!
I have a Tab panel(named pnlInfo) on my form and on that panel i have 2 textboxes.
The following code should return the number of the textboxes (2) but it doesn't work..it returns 0!
Do u know why?
dim i as integer
Dim ctrl As Control
i = 0
For Each ctrl In pnlInfo.Controls
If TypeOf ctrl Is TextBox Then
i += 1
End If
Next
MessageBox.Show(CStr(i))
I have a Tab panel(named pnlInfo) on my form and on that panel i have 2 textboxes.
The following code should return the number of the textboxes (2) but it doesn't work..it returns 0!
Do u know why?
dim i as integer
Dim ctrl As Control
i = 0
For Each ctrl In pnlInfo.Controls
If TypeOf ctrl Is TextBox Then
i += 1
End If
Next
MessageBox.Show(CStr(i))