Share via


Parent Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns the parent object for the specified object.

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