Parent Property

Microsoft Office Web Components Visual Basic

expression.Parent

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The event procedure in this example runs whenever the user clicks in the chart workspace.

Sub ChartSpace1_Click()

   Dim chConstants
   Dim iSeriesNum
   Dim iPointNum

   Set chConstants = ChartSpace1.Constants

   If ChartSpace1.SelectionType = chConstants.chSelectionPoint Then
      ' Point parent is series.
      iSeriesNum = ChartSpace1.Selection.Parent.Index

      iPointNum = ChartSpace1.Selection.Index

      MsgBox "Series: " & iSeriesNum & " Point: " & iPointNum
   End If

End Sub