Solved

Change Excel Chart Colors from VB6

Posted on 2004-04-02
3
618 Views
Last Modified: 2012-05-04
Hi Experts,
  I have data that I export to excel which is used by a chart that has already been set up.  The problem that I am having is with the color of the bars.  The user can specify what colors to use with a Common Dialog Box.  I get a 1004 error in the when I try to change the bar colors with this line:
ActiveChart.SeriesCollection(3).interior.colorindex = &H00FF0000&

  What is the right way to change the colors of the bars based on the user's input from the Common Dialog Box??
Thanks in advance!
-Ren
0
Comment
Question by:Ren
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 400 total points
ID: 10742979
How about


ActiveChart.SeriesCollection(3).interior.color = &H00FF0000&
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 10742987
Or

ActiveChart.SeriesCollection(3).border.color = &H00FF0000&
0
 

Author Comment

by:Ren
ID: 10775216
I knew it would be something simple like that!  It was the word "index" and the end of "color" that seemed to be causing the problem  Thanks for the input!
-Ren
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question