You can use the Shapes class to get a shapes position (left
and top
). If you need their right or bottom position add left
and width
or top
and height
.
Sub GetShapePosition()
Debug.Print "Left: " & ActiveSheet.Shapes("Oval 1").Left
Debug.Print "Width: " & ActiveSheet.Shapes("Oval 1").Width
Debug.Print "Right: " & ActiveSheet.Shapes("Oval 1").Left + ActiveSheet.Shapes("Oval 1").Width
Debug.Print "Top: " & ActiveSheet.Shapes("Oval 1").Top
Debug.Print "Height: " & ActiveSheet.Shapes("Oval 1").Height
Debug.Print "Bottom: " & ActiveSheet.Shapes("Oval 1").Top + ActiveSheet.Shapes("Oval 1").Width
End Sub