Change Excel Chart Colors from VB6

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
RenAsked:
Who is Participating?
 
EDDYKTConnect With a Mentor Commented:
How about


ActiveChart.SeriesCollection(3).interior.color = &H00FF0000&
0
 
EDDYKTCommented:
Or

ActiveChart.SeriesCollection(3).border.color = &H00FF0000&
0
 
RenAuthor 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
0
All Courses

From novice to tech pro — start learning today.