CodeItBetter Programming Another VB Programming Blog

How to count the number of textboxes in a form

Posted on January 4, 2009
1
2
3
4
5
6
'Controls - How to count the number of textboxes in a form
Dim ctl As Control, iCount As Integer
For Each ctl In Me.Controls
    If TypeOf ctl Is TextBox Then iCount = iCount + 1
Next ctl
Debug.Print iCount
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.