#Passing Control Arrays?
4 messages in this thread
Does anyone know if you can pass control arrays to a subroutine in a .BAS
module? I've searched high and low and can't seem to find out for sure. I
know you can pass a control or form. Anyone???
john g
There are 2 Replies.
John,
I don't believe it's possible to pass a control array to a procedure.
Instead, you need to call the procedure once for each control:
For I = 0 To LastControl
SomeProc CtlName(I)
Next
It does sound like an interesting idea for 2.0 though! As long as were at
it, I hollered a lot about control arrays during the VB beta period. In
particular, I wished for LBound and UBound functions. The big problem is
that control arrays do not require that all elements be used, so perhaps
they're not appropriate.
Mark
There is 1 Reply.
Mark, I was afraid of that … I've written a bunch of code depending on
that ability! I should have checked first. I'm sure I can get around it
using your method, it's just more awkward and might slow things down a bit.
Thanks for the help.
john g