Click here to Skip to main content
15,308,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I want to pass multipul parameres in function.

I have function called EnableControls as below.

Function EnableControls(ByVal ctl as control)
       ' "ByVal ctl as control" should accept multiple entries OR values
       ' Execute loop which accept all controls in ctl parameter
       ' For e.g. (Loop is tentative I need solution for loop as well)
       For i = 0 to ctl.length
            'Execute loop here (I need loop solution)
             'i.e. ctl[X control].Enabled = True

End Function

Function will called here

EnableControls ('Here I want to pass as many as controls e.i. txtname,txtaddress,txtphoneno etc,btnaddrecoed)

1 solution

Function EnableControls (ParamArray controls() As Control)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900