Microsoft Office Tutorials and References
In Depth Information
21.18 Example: Printing Embedded Charts
90 StockVHLC
91 StockVOHLC
92 CylinderColClustered
93 CylinderColStacked
94 CylinderColStacked100
95 CylinderBarClustered
96 CylinderBarStacked
97 CylinderBarStacked100
98 CylinderCol
99 ConeColClustered
100 ConeColStacked
101 ConeColStacked100
102 ConeBarClustered
103 ConeBarStacked
104 ConeBarStacked100
105 ConeCol
106 PyramidColClustered
107 PyramidColStacked
108 PyramidColStacked100
109 PyramidBarClustered
110 PyramidBarStacked
111 PyramidBarStacked100
112 PyramidCol
Note the use of the On Error line in ScrollChartTypes , which resumes execution in case
we try to set the chart type to a value that is not acceptable for the particular chart.
The Delay procedure simply waits for the prescribed number of seconds. Finally, the
MouseDown event changes the state of the module level Boolean variable bPause . When the left
mouse button is clicked, scrolling is paused until the mouse button is clicked again. To stop the
procedure completely, just hit Ctrl-Break.
21.18 Example: Printing Embedded Charts
We can now implement the PrintCharts feature of our SRXUtils application. This is designed
to provide a list of the embedded charts in the active workbook, so the user can select from this list
and print the selected charts. (To print a chart sheet, use the PrintSheets utility.)
Implementing the PrintCharts utility is similar to implementing the PrintSheets and
PrintPivotTables utilities, which we did earlier in the topic. At the present time, this print
utility, located in the Print.utl add-in, simply displays a message box. To implement this feature,
we want the utility to first display a dialog box, as shown in Figure 21-32 .
Figure 21-32. Print Charts dialog
Search JabSto ::

Custom Search