Creating a Menu Control Array
A menu control array is made up of one or more menu items that share a common name and event procedures. Each menu item has a unique index number, but all the items share the same setting of the Name2016V9P property. You can designate one or more contiguous menu items at the same menu level as a control array. This enables you to dynamically add or remove menu items during run time .
To create a menu control array with one menu item
1. Create the menu item.
2. In the Index text box, enter a number.
To create a menu control array with more than one menu item
1. Create a menu item.
2. In the Index text box, enter a number. This number determines the menu item's position in the control array.
3. Create another menu item with the same control name.
4. In the Index text box, enter a unique number.
5. Repeat steps 2-4 for each additional menu item.
Note 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.
Adding and Deleting Controls at Run Time
Attaching an Event Procedure to a Form or Control
Chapter 4, "Menus and Dialogs"