By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

How to remove chart legend

P: 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
With X.DataLabel.Font
..Size = "8" = "Arial"
End With
End If

Thanks in advance


Mar 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.