Get shape and output its z order : Shape « Excel « VBA / Excel / Access / Word






Get shape and output its z order

 
Sub Shape_Index_Name()
    Dim myVar As Shapes
    Dim myShape As Shape
    Set myVar = Sheets(1).Shapes
   
    For Each myShape In myVar
        MsgBox "Index = " & myShape.ZOrderPosition & vbCrLf & "Name = " _
            & myShape.Name
    Next

End Sub

 








Related examples in the same category

1.Draw a star
2.Create a shape and set its color
3.Delete a shape
4.Looping through a Collection of Shapes
5.The OLEObjects Collection