title: Errorbars formatting in Excel 2007
body: <p>Using a macro in excel 2007 I want to display the following errorbars:</p>
  
  <ul>
  <li>No horizontal errorbar.</li>
  <li>Red dashed with 100 plus value vertical errorbar.</li>
  </ul>
  
  <p>I can get everything I want except the color and I don't understand why. Below is the code.</p>
  
  <pre><code>ActiveChart.SeriesCollection(6).HasErrorBars = True
  With ActiveChart.SeriesCollection(6).ErrorBars
      .EndStyle = xlNoCap
      .Format.Line.Visible = msoTrue
      .Format.Line.ForeColor.RGB = RGB(255, 0, 0)
      .Format.Line.ForeColor.TintAndShade = 0
      .Format.Line.Weight = 2
      .Format.Line.DashStyle = msoLineDash
  End With
  ActiveChart.SeriesCollection(6).ErrorBar Direction:=xlX, Include:=xlNone, Type:=xlFixedValue, Amount:=0
  ActiveChart.SeriesCollection(6).ErrorBar Direction:=xlY, Include:=xlPlusValues, Type:=xlFixedValue, Amount:=100
  </code></pre>