Page 390 - Microsoft Office Excel 2003 Programming Inside Out
P. 390

Part 5:  Manipulating Excel Objects
                                        Microsoft Office Excel 2003 Programming Inside Out

                             This procedure starts with the cell that contains the Field Name label, verifies that the next
                             cell in the field name column isn’t blank, and then moves through the Do…While loop,
                             assigning fields to the listed orientation and position, until it finds a blank cell in the list of
                             field names.

                             Tip  Make Each One Special
                             You should make a version of the ResetFromRecorded procedure for each stored position
                             you want to use. In doing so, you would be able to specify the starting cell in the macro
                             code and attach the macro to a menu item, toolbar button, or other object so that the
                             macro can be run with a single click.


                             In this chapter, you’ve explored PivotTables and PivotCharts, learning how to create them
                             programmatically and through the Excel user interface. After the discussion of how to create
                             PivotTables, you learned some valuable techniques for manipulating them programmatically.
                             The procedures at the end of the chapter are valuable tools for anyone who wants to use data
                             to tell a story, instead of fumbling for words while trying to find a particular PivotTable layout.

















             Chapter 16

























                364
   385   386   387   388   389   390   391   392   393   394   395