ZOrder Property

Applies To

Arc Object, Arcs Collection, Button Object, Buttons Collection, ChartObject Object, ChartObjects Collection, CheckBox Object, Drawing Object, DrawingObjects Collection, Drawings Collection, DropDown Object, DropDowns Collection, EditBox Object, EditBoxes Collection, GroupBox Object, GroupBoxes Collection, GroupObject Object, GroupObjects Collection, Label Object, Labels Collection, Line Object, Lines Collection, ListBox Object, ListBoxes Collection, OLEObject Object, OLEObjects Collection, OptionButton Object, OptionButtons Collection, Oval Object, Ovals Collection, Picture Object, Pictures Collection, Rectangle Object, Rectangles Collection, ScrollBar Object, ScrollBars Collection, Spinner Object, Spinners Collection, TextBox Object, TextBoxes Collection.

Description

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

Remarks

For 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 three ovals on the active sheet, the oval at the back of the z-order is ActiveSheet.Ovals(1), and the oval at the front of the z-order is ActiveSheet.Ovals(ActiveSheet.Ovals.Count).

See Also

BringToFront Method, SendToBack Method.

Example

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


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