Connecting Tech Pros Worldwide Help | Site Map

How to remove chart legend

  #1  
Old March 11th, 2006, 05:05 AM
Bon
Guest
 
Posts: n/a
Hello guys

Could anyone give me some hints on writng vba code for deleting legend
with zero value.
My chart is just shown percents There is a legend shown on the right
hand size.

I used the following lines to remove a pie chart with zero percent.

Set objChart = Me.oleLatestGraph.Object

For Each X In objChart.SeriesCollection(1).Points
'Use the following line for charts with just percents
If InStr(X.DataLabel.Text, "0%") > 0 Then
X.DataLabel.Delete
Else
With X.DataLabel.Font
..Size = "8"
..name = "Arial"
End With
End If
Next

Thanks in advance

Cheers
Bon

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting cannot find symbol karinmorena answers 2 February 15th, 2008 05:03 AM
Updating a DataGrid using an ArrayList Jeffrey Spoon answers 8 November 21st, 2005 03:45 PM
Graph Chart using Access 2k3 with 2k format Dave answers 2 November 13th, 2005 04:06 AM
MS Graph - Late Binding Question JD Kronicz answers 1 November 12th, 2005 03:06 PM