guibgirl86
New Member
- Joined
- May 14, 2013
- Messages
- 22
I am adding a chart in VB and I want it to show the major gridlines
this is my code
ActiveChart.Axes(x1Value).HasMajorGridlines = True
ActiveChart.Axes(x1Value).MajorGridlines.Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 0
.Solid
End With
when I run the code i get a run error
'-2147467259 (80004005)'
Method'axes'of object'_chart'failed
it is an XYscatter chart if that makes a difference.
this is my code
ActiveChart.Axes(x1Value).HasMajorGridlines = True
ActiveChart.Axes(x1Value).MajorGridlines.Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 0
.Solid
End With
when I run the code i get a run error
'-2147467259 (80004005)'
Method'axes'of object'_chart'failed
it is an XYscatter chart if that makes a difference.