Export (0) Print
Expand All

Parent Property

Office 2003

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

		




Show:
© 2015 Microsoft