Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

turning chart values on

Status
Not open for further replies.

User4Fun

Programmer
Aug 6, 2008
15
US

Sheets("ACUITY Vs ISTEP GRAPH").Charts("acutep").ApplyDataLabels = True


How can I make the values at the points ofthe graph show???
 
Asssuming your chart "acutep" is embedded in a sheet "ACUITY Vs ISTEP GRAPH". try something like this:


Worksheets("ACUITY Vs ISTEP GRAPH").ChartObjects _
("acutep").Chart.SeriesCollection(1).ApplyDataLabels _
Type:=xlDataLabelsShowValue, AutoText:=True, _
LegendKey:=False

 
Correction, I'm not sure if you can use the chart name as an argument to chartojects.

But if it is the only chart in the sheet than you can pull it out of the sheet chartobjects collection using index 1, like this:

Worksheets("ACUITY Vs ISTEP GRAPH").ChartObjects _
(1).Chart.SeriesCollection(1).ApplyDataLabels _
Type:=xlDataLabelsShowValue, AutoText:=True, _
LegendKey:=False
 
it works great, thanky ou very much. What would you do to turn the values off?
 
Start your macro recorder
Select series on the chart
Right-click and select "format data series"
On the tab labeled data labels, click "none"
turn macro recorder off an inspect the code
)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top