Gridlines Methods

Name

Returns Parameters

Description

Delete

Variant

Deletes the Gridline object

Select

Variant

Selects the gridlines on the chart

Gridlines Object Example

Sub AddAndFormatGridLines()

Dim oChart As Chart

Dim oGridline As Gridlines

Sub AddAndFormatGridLines()

Dim oChart As Chart

Dim oGridline As Gridlines

'Set the target chart and set up the gridline object

Set oChart = ActiveSheet.ChartObjects("Chart 1").Chart Set oGridline = oChart.Axes(xlValue).MajorGridlines

'Add MajorGridlines oChart.Axes(xlValue).HasMajorGridlines = True

'Format gridlines With oGridline

.Border.Weight = xlMedium .Border.LineStyle = xlContinuous .Border.ColorIndex = 3 End With

End Sub

Was this article helpful?

0 0
The Accidental Blogging Millionaires

The Accidental Blogging Millionaires

Get Inspired By The Most Popular Bloggers Online! If You Want To Skyrocket Your Success With Business And Improve Your Overall Life You Need To Have A Look At The Accidental Blogging Millionaires! Business can be a fight, particularly when you’re trying to establish one online and like all fights, to succeed you must find the winning techniques and apply them.

Get My Free Ebook


Post a comment