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

Related posts:

  1. How to Clear all TextBoxes on the form
  2. How to Clear all TextBoxes in a Form
  3. How to select all text with Ctrl+A in all TextBoxes in a form
  4. How to count number of files in a given directory (in two ways)
  5. How to Count the Number of lines in a Text Box
  6. How to clear all control’s values in a form
  7. How to count number of sub-directories in a given directory (in two ways)
  8. How to count number of lines in a Text box
  9. How to reposition and resize all the controls on a form whenever the form is resized.
  10. How to save data from different textboxes in the same file.

Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.