Right now I am able to create the chart, but I am having trouble switching row/column in the graph. The following code works, except for PlotBy:=xlColumns. Any help with be truly appreciatied!
<html>
Worksheets("CreateTripleMFile").Shapes.AddChart(xlColumnClustered, Left:=Worksheets("CreateTripleMFile").Range("j11").Left, Top:=Worksheets("CreateTripleMFile").Range("o11").Top, _
Width:=Worksheets("CreateTripleMFile").Range("j11:O24").Width, Height:=Worksheets("CreateTripleMFile").Range("j11:j24").Height).Select
Set Rng1 = Worksheets("CreateTripleMFile").Range("p1:r4")
Set rng2 = Worksheets("CreateTripleMFile").Range("d1:d4")
With ActiveChart
.SetSourceData Source:=Union(Rng1, rng2) _
PlotBy:=xlColumns
.SetElement (msoElementChartTitleAboveChart)
.ChartTitle.Caption = "SituationalResourceCodes"
.Legend.Position = xlBottom
.Legend.Left = 0.209
.Legend.Width = 325
.Legend.Height = 24
.SeriesCollection(1).ChartType = xlColumnClustered
End With
</html>
Bookmarks