Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 11th, 2006, 05:05 AM
Bon
Guest
 
Posts: n/a
Default How to remove chart legend

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

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles