The trick to this tip is to pass the control array As Object. The code in this example passes a control array txtPerson( ) to a subroutine.
Private Sub Form_Load()
Test txtPerson()
End Sub
Sub Test(ctrlArr As Object)
Dim txt As TextBox
For Each txt In ctrlArr
Debug.Print txt.Index
Next
End Sub
|