HasMajorGridlines Property
True if the specified axis has major gridlines. Note that any axis can have gridlines. Read/write Boolean.
expression.HasMajorGridlines
*expression * Required. An expression that returns a ChAxis object.
Example
This example turns on the major and minor gridlines on the first chart in ChartSpace1.
Sub EnableGridlines()
Dim chConstants
Dim axValueAxis
Set chConstants = ChartSpace1.Constants
' Set a variable to refer to the value axis.
Set axValueAxis = ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)
' Enable the major gridlines on the value axis.
axValueAxis.HasMajorGridlines = True
' Enable the major gridlines on the value axis.
axValueAxis.HasMinorGridlines = True
End Sub
Applies to | ChAxis Object
See Also | HasMinorGridlines Property | MajorGridlines Property | MinorGridlines Property