Example Outputting the IDs of Command Bar Controls

&Save 3

&Copy 19

Cu&t 21

&Paste 22

Open 23

Can't Repeat 37

&Microsoft Word 42

Clear Contents 47

Custom 51

&Piggy Bank 52

Custom 59

&Double Underline 60 Custom 67 Custom 68 &Close 106 AutoFormat 107 &Format Painter 108 Print Pre&view 109 Custom 112 &Bold 113 &Italic 114 &Underline 115

We will consider an example that uses built-in controls later in the chapter (at which time it should become clearer just what a built-in control is.)

12.6 Example: Creating a Menu

The program shown in Example 12-5 creates the menu system shown in Figure 12-3 on Excel's worksheet menu bar. Note that the macros that are invoked by the selection of the menu items are named ExampleMacrol and ExampleMacro2.

Figure 12-3. An example custom menu

Figure 12-3. An example custom menu

0 0

Post a comment