Page 14 - Microsoft Office Excel 2003 Programming Inside Out
P. 14
Table of Contents
Programming PivotTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Creating a PivotTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Creating a PivotChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Manipulating PivotTables Programmatically. . . . . . . . . . . . . . . . . . . . . . . 359
Pivoting a PivotTable Programmatically . . . . . . . . . . . . . . . . . . . . . . 359
Resetting a PivotTable to Its Original Position . . . . . . . . . . . . . . . . . 361
Recording and Restoring Arbitrary PivotTable Positions . . . . . . . . . . 361
Chapter 17
Command Bars 365
Identifying Parts of the Menu System. . . . . . . . . . . . . . . . . . . . . . . . . . . 365
CommandBars Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
CommandBar Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Listing CommandBar Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Adding a Floating Command Bar . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Deleting a Command Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Command Bar Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
CommandBarControls Collection . . . . . . . . . . . . . . . . . . . . . . . . . . 371
CommandBarControl Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Button Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Creating Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Combo Box Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Using a Combo Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Pop-Up Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Displaying a Pop-Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Adding Items to an Existing Menu . . . . . . . . . . . . . . . . . . . . . . . . . 382
Chapter 18
Customizing Dialog Boxes 383
Displaying Existing Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Modifying Existing Dialog Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Exploring the Dialogs Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Passing Arguments to Existing Dialog Boxes. . . . . . . . . . . . . . . . . . 393
Planning with Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Chapter 19
Creating User Forms 395
Creating a UserForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Adding a UserForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Designing a UserForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Modifying a UserForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Properties of a UserForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Displaying a UserForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
xiv