PDA

View Full Version : Solved: Combo Chart creation



nsaint
08-30-2009, 10:33 AM
I am looking to create a chart using VBA. The chart must be a combo Line/Area chart. I know how to do this with regular charts and have codes many examples, but I am running into a problem with this one.

I have six columns of data. The first two I want to be for the first x-axis and the remaining four for the second x-axis. When I try to do this from the chart wizard, it simply splits the total of six columns into two groups - which is not what I want. How can I control in VBA the grouping I mentioned above?

mdmackillop
08-30-2009, 04:00 PM
Can you post a workbook with sample data and the Chart type you are after.

nsaint
09-03-2009, 09:05 AM
Yes, sorry about that. I have the attached with the data and a combo chart. The chart is not what I want, but the data groups 1 and 2 are how I need to control what gets placed on the chart.

I need to have data Group1a and 1b as the area portion of the chart and data group2a-d as the lines and do so from VBA.

nsaint
09-05-2009, 04:52 AM
Well, I kept at it and solved the problem on my own; however, I would thank all people that have helped in the past. The solution is posted here for reference only, in case someone else runs into this problem.

Please note the formatting of the sheet and some of the variables I used are with purpose in the context of the "real" workbook this code lives in - this is just a sample. These variables were used as the range of cells will always be different.

Anyway, bye for now.