Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.14 KB

Excel.OLEObjects.ZOrder.md

File metadata and controls

45 lines (26 loc) · 1.14 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
OLEObjects.ZOrder property (Excel)
vbaxl10.chm419092
vbaxl10.chm419092
Excel.OLEObjects.ZOrder
44bfb522-6edf-cf77-45ef-0b68f14514ef
05/02/2019
medium

OLEObjects.ZOrder property (Excel)

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

Syntax

expression.ZOrder

expression A variable that represents an OLEObjects object.

Remarks

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).

Example

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

MsgBox "The chart's z-order position is " & _ 
 Worksheets("Sheet1").ChartObjects(1).ZOrder

[!includeSupport and feedback]