Re: Calling a subroutine from an array

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance





"Harry Strybos" wrote:

"KAB" <KAB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FB2E0D86-705E-4A2B-84E3-02804FE82AE6@xxxxxxxxxxxxxxxx
Hi:

I created an array of command buttons :


Dim Button(5) As CommandButton

and loaded the each button into the array using "set"

Set Button(0) = Name1 : Set Button(1)=Name2 .

I would like to call a subroutine using the name referenced by the array -
something like:

Call Button(x).Name

Does anyone know if this is possible in VB?

Thanks
KAB

Why not simply use a control array?



Hi:

Thanks for the reponse, I'm new to Visual Basic so I don't know about
control arrays. I'll take a look at this.

Thanks again
KAB

.


Quantcast