Errorbar weight property not working

dpiano1984

New Member
Joined
Feb 8, 2013
Messages
14
I'm automating a chart to make errorbars, however when I create the Errorbar the weight does not change, even though I specify the weight. Here is my code:

Code:
Set s = .SeriesCollection.NewSeries()                With s
                    .Name = "=GraphicSchedule!$" & getColumn(objList.ListColumns.Item("Activity").Range.Column) & "$" & sourceRow
                    .XValues = "=GraphicSchedule!$" & getColumn(objList.ListColumns.Item("DateMid").Range.Column) & "$" & sourceRow
                    .Values = "=GraphicSchedule!$" & getColumn(objList.ListColumns.Item("Loc1").Range.Column) & "$" & sourceRow
                    .MarkerStyle = xlMarkerStyleNone
                    .HasErrorBars = True
                    .ErrorBar Direction:=xlX, Include:=xlErrorBarIncludeBoth, Type:=xlErrorBarTypeCustom, Amount:="=GraphicSchedule!$" & getColumn(objList.ListColumns.Item("BarLength").Range.Column) & "$" & sourceRow, MinusValues:="=GraphicSchedule!$" & getColumn(objList.ListColumns.Item("BarLength").Range.Column) & "$" & sourceRow
                    Set eB = .ErrorBars
                    With eB
                        With .Format.Line
                            .Style = msoLineSingle
                            .BackColor.RGB = gs.Range(getColumn(objList.ListColumns.Item("Color").Range.Column) & sourceRow).Interior.Color
                            .Weight = 12
                            .ForeColor.RGB = gs.Range(getColumn(objList.ListColumns.Item("Color").Range.Column) & sourceRow).Interior.Color
                        End With
                        .EndStyle = xlNoCap
                    End With
                    
                    .HasDataLabels = True
                    Set dLabels = .DataLabels
                    With dLabels
                        .Format.TextFrame2.TextRange.InsertChartField msoChartFieldRange, "=GraphicSchedule!$" & getColumn(objList.ListColumns.Item("Activity").Range.Column) & "$" & sourceRow
                        .ShowRange = True
                        .ShowSeriesName = False
                        .ShowValue = False
                    End With
                End With
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,216,111
Messages
6,128,898
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top