title: Manipulating excel 2007 chart grid lines in VBA
body: <p>Using Excel 2007, is it possible to change the transparency of chart grid lines using VBA or VB.NET?</p>
  
  <p>I have the following code, which throws an exception on the last line:</p>
  
  <pre><code>Dim axis As Excel.Axis = chart.Axes(Excel.XlAxisType.xlCategory)
  axis.HasMajorGridlines = True
  axis.MajorGridlines.Border.Color = Color.Gray.ToArgb
  axis.MajorGridlines.Border.LineStyle = Excel.XlLineStyle.xlContinuous
  axis.MajorGridlines.Format.Fill.Transparency = 0.8
  </code></pre>
  
  <p>( Of course, this code is in VB.NET )</p>
  
  <p>Thanks!</p>