OLEObject.ZOrder property (Excel)

Returns the z-order position of the object. Read-only Long.



expression A variable that represents an OLEObject object.


In any collection of objects, the object at the back of the z-order is collection(1), and the object at the front of the z-order is collection(collection.Count).

For example, if there are embedded charts on the active sheet, the chart at the back of the z-order is ActiveSheet.ChartObjects(1), and the chart at the front of the z-order is ActiveSheet.ChartObjects(ActiveSheet.ChartObjects.Count).


This example displays the z-order position of embedded chart one on Sheet1.

MsgBox "The chart's z-order position is " & _ 

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.