Applies To
Chart Object, DialogSheet Object, Worksheet Object.
Description
Accessor. Returns an object that represents a single line (a Line object, Syntax 1) or a collection of lines (a Lines object, Syntax 2) on the sheet. Read-only.
Syntax 1
object.Lines(index)
Syntax 2
object.Lines
object
Required. The object to which this method applies.
index
Required for Syntax 1. The name or number of the line.
Remarks
This property returns both lines and arrows. The only difference between a line and an arrow is the ArrowHeadStyle property.
Example
This example deletes line three on Sheet1.
Worksheets("Sheet1").Lines(3).Delete
This example formats every line on Sheet1 as red.
For Each l In Worksheets("Sheet1").Lines l.Border.ColorIndex = 3 Next l