SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 186 | Next

Jim DeMarco

"Pro Excel 2007 VBA"

Microsoft has rebuilt the UI to include tools that make
chart type selection quick and easy. There are tools to allow us to quickly change, remove, or
add chart elements like titles, legends, data labels, and more. And charts now look even better
through the use of ClearType fonts that improve readability.
Getting Started
As with many of the previous features we??™ve explored, we??™ll manually create a few different
charts and record macros to take a look at some of the chart object properties and methods.
Then we??™ll write our own code to create charts for our users.
1. In the Download section for this book on the Apress web site, find the file named
Chart01.xlsx and open the workbook.
2. Since we know we??™ll be inserting code into this workbook, let??™s save it in the macroenabled
format, as Chart01.xlsm.
3. Activate the Monthly Total Sales Amount worksheet.
The Chart01.xlsm file shown in Figure 5-1 contains three worksheets containing Northwind
sales data, including sales by category, sales amounts by product, and total sales for
products in the beverage product line.
4. On the Developer ribbon, choose Record Macro from the Code section.
5. Name the Macro MakeBeverageSalesChart, as shown in Figure 5-2.
6. Click OK to run the Macro Recorder.
7. Select the data in cells A1:E7, as in Figure 5-3.
193
C H A P T E R 5
Figure 5-1. Northwind sales data on the Monthly Total Sales Amount worksheet
Figure 5-2. Recording the MakeBeverageSalesChart macro
Figure 5-3.


Pages:
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198