Class Gridlines (PowerPoint VBA)

The class Gridlines represents major or minor gridlines on a chart axis.

Set

To use a Gridlines class variable it first needs to be instantiated, for example

Dim grds as Gridlines
Set grds = ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines

The following procedures can be used to set variables of type Gridlines: Axis.MajorGridlines and Axis.MinorGridlines

Border

Returns the border of the object.

Dim cbrBorder As ChartBorder
Set cbrBorder = ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines.Border

Delete

Deletes the object.

ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines.Delete

Format

Returns the line, fill, and effect formatting for the object.

Dim cftFormatted As ChartFormat
Set cftFormatted = ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines.Format

GetProperty

Syntax : expression.GetProperty (Id)

Name

Returns the name of the object.

Dim strName As String
strName = ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines.Name

Parent

Returns the parent for the specified object. Read-only object.

Select

Selects the object.

ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines.Select

SetProperty

Syntax : expression.SetProperty (Id, Value)

Dim strId As String: strId = 
ActiveWindow.RangeFromPoint.Chart.Axes(1).MajorGridlines.SetProperty Id:=strId, Value:=

Arguments

The following arguments are required:

Id - String

Value