Microsoft Office Tutorials and References
In Depth Information
Figure 21-8. Illustrating ApplyCustomType
xlAnyGallery = 23
End Enum
(The term ChartGallery does not seem to appear in the Excel documentation. However, in the
Word object model, the term ListGallery refers to the objects that represent the three tabs in the
Bullets and Numbering dialog box. Extrapolating to Excel, we might surmise that the term
ChartGallery refers to the two tabs in the Chart Type dialog box in Figure 21-8 . )
If ChartType is an XlChartGallery constant, then the optional TypeName parameter specifies
the name of the custom chart type.
For instance, the following code:
ActiveChart.ApplyCustomType _
ChartType:=xlBuiltIn, TypeName:="Blue Pie"
applies the built-in chart type called Blue Pie. This is equivalent to selecting Blue Pie in the Excel
dialog box shown in Figure 21-8 .
Figure 21-8. Illustrating ApplyCustomType
As another example, the following code sets the chart type to a user-defined type named
ActiveChart.ApplyCustomType _
ChartType:=xlUserDefined, TypeName:="DefaultXY"
21.4 Children of the Chart Object
Search JabSto ::

Custom Search