PC Review


Reply
Thread Tools Rate Thread

Pie Chart Colors

 
 
djf
Guest
Posts: n/a
 
      15th Sep 2009
I want to set the colors in a pie chart to the same colors everytime it runs.
I've tried recording an Excel macro and then converting it to Access but
could not get it to work. I've searched for VBA to do it and I've found code
like this:
With Me.ChartSpace.Charts(0)
.SeriesCollection(1).Interior.Color = RGB(255, 128, 128) 'peach
.SeriesCollection(2).Interior.Color = RGB(0, 255, 128) 'green
.SeriesCollection(3).Interior.Color = RGB(0, 128, 255) 'blue
.SeriesCollection(4).Interior.Color = RGB(128, 255, 255) 'turquoise
.SeriesCollection(5).Interior.Color = RGB(255, 255, 128) 'yellow
.SeriesCollection(0).Interior.Color = RGB(255, 0, 255) 'magenta
End With

I played with the code and got it to use the first color but it changed all
pie wedges to the same color and then errored out when it went to the next
series collection.

Does anyone know the VBA to set the colors?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart Colors awach Microsoft Access Reports 0 15th Apr 2009 09:12 PM
Bar Chart colors less than zero ORLANDO VAZQUEZ Microsoft Excel Misc 2 28th Jan 2009 10:25 PM
Pie Chart Colors Question Boy Microsoft Excel Programming 1 17th Apr 2008 12:42 PM
pie chart colors deb Microsoft Access Forms 0 17th Mar 2008 01:47 PM
static colors in chart chart =?Utf-8?B?Sm9oYW4=?= Microsoft Excel Charting 1 22nd Sep 2005 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:12 AM.