![]() |
Setting the colour of the legends in chart.
Hi Friends
I create a Line - Column on 2 Axes chart in Excel and I want to change the colour of the Legends. Can anyone help me with that??? Here is the code for the Chart creation..... Regards Senthil Sub ExcelChart() ActiveWorkbook.Charts.Add ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:J13"), PlotBy:= _ xlRows ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _ "Line - Column on 2 Axes" ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1" With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = "AME Gear" .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Count" .Axes(xlCategory, xlSecondary).HasTitle = False .Axes(xlValue, xlSecondary).HasTitle = True .Axes(xlValue, xlSecondary).AxisTitle.Characters.Text = "Percent" End With With ActiveChart.Parent .Top = 170 .Left = 10 .Height = 350 .Width = 600 End With ActiveChart.HasLegend = True End Sub |
All times are GMT +1. The time now is 10:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com