Chart...

Home Search Site Map

Up
Cells...
Chart...
Columns
Comment
Diagram...
Function...
Hyperlink...
Name
Object...
Page Break
Picture
Rows
Symbol...
Worksheet

New! Excel User Group Now Open @ www.excelusergroup.org, Check It Out!


Menu command Type What happens next?
Chart... ...

Invokes the Chart wizard, allowing you to intuitively create a chart in 4 pre-defined steps.

Once a chart is established, you can re-invoke the whole wizard, or certain parts of it, by double clicking on any chart element(s). Click here to see the building of a simple, embedded, column chart. (May be slow to load on a dial-up connection).

Sub AddChart()
'Doesn't invoke the wizard but creates a stacked bar chart
'From range A2:D5 and embeds it in the worksheet
Charts.Add
ActiveChart.ChartType = xlBarStacked
ActiveChart.SetSourceData Source:=Sheets("Sheet12").Range("A2:D5"), _
PlotBy:=xlRows
ActiveChart.SeriesCollection(1).XValues = "=Sheet12!R1C2:R1C4"
ActiveChart.SeriesCollection(2).XValues = "=Sheet12!R1C2:R1C4"
ActiveChart.SeriesCollection(3).XValues = "=Sheet12!R1C2:R1C4"
ActiveChart.SeriesCollection(4).XValues = "=Sheet12!R1C2:R1C4"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet12"
End Subub

Top

 

Copyright Nick Hodge 2008. All Rights Reserved.