Solved

Change Excel Chart Colors from VB6

Posted on 2004-04-02
3
616 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 VB code 9 102
I need help formating a date variable in my VB.Net application 2 44
How to make an ADE file by code? 11 79
MsgBox 4 45
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now