Passing control arrays to subs 
Author Message
 Passing control arrays to subs

I need to pass a control array to a subroutine. Something like

        Private Sub Test(txtC() as TextBox)
        .
        .
        .
        txtC(3)=""
        .
        end sub

elsewhere in the program

        Test txtBox1()
        .
        .
        Test txtBox2()

I understand that a control array is not implemented as a normal array is
and that the above is not legal.

My question is: How can I do the equivalent?

Thanks
Cal George

P.S.

With a normal array is the correct way to pass an array Arr to Junk    
        Junk Arr()
or
        Junk Arr



Thu, 04 Jan 2001 03:00:00 GMT  
 Passing control arrays to subs
Cal George

Try passing the control array as an objectl

Private Sub Test(txtC as Object)
Dim i as integer
    For i = 1 to txtC.UBound
        Debug.Print txtC(i).Text
    Next i
End Sub

Test txtC()

Mike.......

Quote:

>I need to pass a control array to a subroutine. Something like

> Private Sub Test(txtC() as TextBox)
> .
> .
> .
> txtC(3)=""
> .
> end sub

>elsewhere in the program

> Test txtBox1()
> .
> .
> Test txtBox2()

>I understand that a control array is not implemented as a normal array is
>and that the above is not legal.

>My question is: How can I do the equivalent?

>Thanks
>Cal George

>P.S.

>With a normal array is the correct way to pass an array Arr to Junk
> Junk Arr()
>or
> Junk Arr



Sun, 07 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing Control Arrays to Sub-Procedures

2. Help how to pass control arrays to sub ??

3. How to pass control arrays to subs

4. Pass control array to sub/function ?

5. Q: Passing first (original) element of a control array to a SUB

6. Passing an Array of Controls to a Sub

7. Passing Control Array to a SUB/FUNCTION

8. pass an array as function/sub argument

9. Question on passing array parameters to VB.NET Sub/Function

10. Problem in passing datarow array from one sub to other

11. Passing Arrays from Sub to Program

12. Help! Problem passing string array to sub

 

 
Powered by phpBB® Forum Software