Selecting Objects within Excel

Vertex42 The Excel Nexus

Professional Excel Templates

Get Instant Access

You can place any object that you want in an Excel worksheet, including pictures and sounds. These kinds of objects work very much the same in Excel as they do in Word. (See the "Selecting Objects in a Word Document" section of Chapter 13.) The main difference is that you use the OLEObjects collection of the sheet that holds the object. However, Excel can also embed Chart objects in a worksheet. Because this is such a special feature, I show you in this section how to work with embedded Chart objects.

The same data can say different things depending on how you present it. A pie chart tells the viewer about parts of a whole, and a bar chart compares individual values. The problem with charts that you create in Excel is that they're static — they continue to say the same thing unless you redesign them. Fortunately, you can control the appearance of an embedded chart just as easily as you can control a standalone chart. The code in Listing 14-7

demonstrates a rotating chart technique. (You can find the source code for this example on the site at go/vbafd5e.)

Was this article helpful?

0 0

Post a comment