We help IT Professionals succeed at work.

Change Excel Chart Colors from VB6

Ren
Ren asked
on
Medium Priority
660 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
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
Or

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

Author

Commented:
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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.