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

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

                             You can move or resize an embedded chart by changing the Top, Left, Width, and Height
                             properties of the ChartObject object. If you already have a reference to the Chart object, you
                             can get a reference to the ChartObject object through the Parent property of the Chart object.
                             Individual series in a chart are Series objects and belong to the SeriesCollection object of the
                             chart. The Delete method of the Series object is used to delete a series from a chart. You use
                             the NewSeries method of the SeriesCollection object to add a new series to a chart.
                             You can assign a VBA array, rather than the more commonly used Range object, to the Values
                             property of a Series object. This creates a chart that is independent of worksheet data and can
                             be distributed without a supporting worksheet.
                             The Values and XValues properties return data values, not the range references used in a
                             chart. You can determine the ranges referenced by a chart by examining the SERIES function
                             in the Formula property of each series.
                             Keep in mind the complexity of the Chart Model as you create procedures that reference
                             charts. Use some of the recommended tips provided to simplify how to reference the chart
                             and produce cleaner code, such as assigning the chart an object variable.
                             In the next chapter, you will learn how to setup your workbook so you can use PivotTables
                             and PivotCharts.

             Chapter 15





































                340
   361   362   363   364   365   366   367   368   369   370   371