Class Gridlines (PowerPoint VBA)

The class Gridlines represents major or minor gridlines on a chart axis. 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

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

GetProperty (Id)

Name

Returns the name of the object.


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

Select

Selects the object.


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

SetProperty

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