O'Reilly logo

Excel® 2010 Power Programming with VBA by John Walkenbach

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18: Working with Charts

IN THIS CHAPTER

Discovering essential background information on Excel charts

Knowing the difference between embedded charts and chart sheets

Understanding the Chart object model

Using methods other than the macro recorder to help you learn about Chart objects

Exploring examples of common charting tasks that use VBA

Navigating more complex charting macros

Finding out some interesting (and useful) chart-making tricks

Working with Sparkline charts

Getting the Inside Scoop on Charts

Excel's charting feature lets you create a wide variety of charts using data that's stored in a worksheet. You have a great deal of control over nearly every aspect of each chart.

An Excel chart is simply packed with objects, each of which has its own properties and methods. Because of this, manipulating charts with Visual Basic for Applications (VBA) can be a bit of a challenge. In this chapter, I discuss the key concepts that you need to understand in order to write VBA code that generates or manipulates charts. The secret, as you'll see, is a good understanding of the object hierarchy for charts.

newfeature.eps Excel 2010 includes a new feature called Sparklines. A Sparkline is a small chart contained in a cell. The Sparklines feature uses an entirely separate object model than charts. I cover this feature in this chapter.

Chart locations

In Excel, a chart can be located ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required