|
Logically you should be able to do this:
Private Sub MyFunction(ByRef MyArray() as TextBox)
however, VB in its strange way, actually doesn't hold control arrays on forms in the same way as arrays of variables. Similarly the ParamArray keyword won't work. Even if you did get it through, ubound() and lbound() don't work on control arrays, nor does the For Each syntax. The only way I can see of doing it is to pass the control array range to the routine (i.e. the upper and lower bounds).
|