CompuServe Thread

#Passing Control Arrays?

4 messages in this thread
#2876From: John GeffelOct 13, 1991 7:32 PM
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.
#2924From: Mark Novisoff/MicroHelpOct 14, 1991 8:30 AM
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.
#3090From: John GeffelOct 14, 1991 9:54 PM
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
#3194From: Don FunkOct 15, 1991 10:45 AM
Hi John, You cannot pass control arrays to a sub. i will add this as a suggestion for future release. Thankyou. Don Funk