View Single Post
Old Feb 13th, 2005, 5:55 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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).
Rory is offline   Reply With Quote