Adding and Deleting Menu Commands at Run Time
After using the Menu Design windowCYRM35. to create a control array with one or more menu items, you can write code (using the Load and Unload statements) to dynamically add or delete menu items in the array at run time
To add or delete menu items in a control array at run time
1. Create a menu control array.
2. Open the Code window by double-clicking a control or the form itself.
3. Go to the event or procedure where you want to Load or Unload members of the control array.
Note At run time, you cannot remove commands created at design time.
Adding and Deleting Controls at Run Time
Chapter 4, "Menus and Dialogs"