Returns the parent object for the specified object. Read-only.
expression.Parent
expression Required. An expression that returns one of the objects in the Applies To list.
Example
This example displays the name of the chart that contains myAxis
.
Sub DisplayParentName()
Set myAxis = Charts(1).Axes(xlValue)
MsgBox myAxis.Parent.Name
End Sub
This example displays the name of the ListColumn object containing the ListDataFormat object for the third column of a list in Sheet1 of the active workbook.
Sub PrintParentName()
Dim wrksht As Worksheet
Dim objListCol As ListColumn
Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
Set objListCol = wrksht.ListObjects(1).ListColumns(3)
Debug.Print objListCol.ListDataFormat.Parent
End Sub