Creating a Control Array
A control array is made up of a group of controls Each control in the array has a unique index number. All items in a control array must have the same setting of the Name property. of the same type (for example, all list boxes) that share a common control name and a set of event procedures.
To create a control array
1. Draw the controls for the array.
2. Select a control you want to include in the array.
3. From the Properties window , select the Name property.
4. In the Settings box, type a name for the control.
5. Choose the Enter button .
6. Repeat steps 2-5 for each control you want in the array, typing the same name as in step 4.
When you type the same Name for the second control, Visual Basic displays a dialog box asking you to confirm that you want to create a control array.
7. Choose Yes to create the control array, or choose No to cancel the action.
Note To remove a control from a control array, change the control's Name property.
When a control in the array recognizes an event, Visual Basic calls an event procedure for the group and passes the index as an additional argument, allowing you to determine which control recognizes the event.
Event procedures for control arrays are defined with the argument "(Index as Integer)."
Adding and Deleting Controls at Run Time
Creating a Menu Bar
Creating a Menu Control Array
Index Property (Control Arrays)
Chapter 3, "Creating and Using Controls"