April 2006
Beginner
1114 pages
98h 16m
English
Use the DropLines and HiLoLines objects to control the appearance of those items on a chart. Use the ChartGroup object’s DropLines, and HiLoLines properties to get a reference to these objects. These objects have the following members:
Application Border Creator Delete Name Parent Select
The DropLines and HiLoLines objects provide a small set of programmable features. You can select, delete, or change the appearance these lines. Be sure to check the ChartGroup object’s Has
xxx property before using any of these objects.
The following code uses the Border property to set the weight, color, and style of the drop lines on a line chart:
Sub FormatDropLines( )
Dim chrt As Chart, cg As ChartGroup, bd As Border
' Get the chart.
Set chrt = ActiveChart
' Set the chart type
chrt.ChartType = xlLineStacked
' Get the chart group.
Set cg = chrt.LineGroups(1)
' Turn on drop lines
cg.HasDropLines = True
' Get the drop line's border
Set bd = cg.DropLines.Border
' Format the lines
bd.Weight = 4
bd.Color = &HFF0000
bd.LineStyle = xlLineStyle.xlDot
End SubRead now
Unlock full access