I am generating a chart in Excel from Access, all of which is working fine. My client has requested that the bar charts be two colour fill and this is causing me problems, debugging the code gives "variable not defined" for 'msogradienthorizontal'. Any guidance gratefully received
relevent bits of code are:
With xlsApp.Application
Set objSheet = .Activeworkbook.Sheets(strSheet1)
set objChart = objSheet.ChartObjects.Add(480,400,455,429)
With objChart.Chart
With .seriescollection(1)
.Shadow = True
.Fill.TwoColorGradient Style:= msoGradientHorizontal, Variant:=1
.Fill.Visible = True
.Fill.Forecolor.Schemecolor = 1
.Fill.Backcolor.Schemecolor = 15
End With
End With
End With
Thanks,
Ken
relevent bits of code are:
With xlsApp.Application
Set objSheet = .Activeworkbook.Sheets(strSheet1)
set objChart = objSheet.ChartObjects.Add(480,400,455,429)
With objChart.Chart
With .seriescollection(1)
.Shadow = True
.Fill.TwoColorGradient Style:= msoGradientHorizontal, Variant:=1
.Fill.Visible = True
.Fill.Forecolor.Schemecolor = 1
.Fill.Backcolor.Schemecolor = 15
End With
End With
End With
Thanks,
Ken