Pen Object, GuideLinePen Property Example

The following example sets the pen attributes for a two-dimensional xy chart series. The GuideLinePen property returns a reference to a Pen object.

Private Sub Command1_Click()
   ' Set Guide Lines for 2D XY chart Series 1.
   MSChart1.ChartType = VtChChartType2dXY
   MSChart1.Plot.SeriesCollection.Item(1) _
   .ShowGuideLine(VtChAxisIdX) = True
   With _
   MSChart1.Plot.SeriesCollection.Item(1).GuideLinePen
      ' Set Pen attributes.
      .VtColor.Set 255, 255, 0
      .Width = 10
      .Style = VtPenStyleDashDot
      .Join = VtPenJoinRound
      .Cap = VtPenCapRound
   End With
End Sub