View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Anony Anony is offline
external usenet poster
 
Posts: 35
Default Have the width/height of a autoshape placed in a cell

Just run this in your typical VBA module. This will display the heights and
widths of all of your shapes on the active sheet:

Sub ShapeSizes()
Dim MyShape As Shape
Dim i As Long

For Each MyShape In ActiveSheet.Shapes
MyShape.Select
With Selection
ActiveSheet.Cells(1 + i, 1) = .ShapeRange.Height
ActiveSheet.Cells(2 + i, 1) = .ShapeRange.Width
End With
i = i + 2
Next MyShape
End Sub

------
Cheers,
Anony


"Ed Bachmann" wrote:

In Excel 2003 I have inserted 4 autoshape rectangle boxes. When I double on
the autoshape the Format Autoshape box appears and under the Size tab it show
the height and width of the autoshape box. My question is how can I have the
height and width information in this dialog box input into my spread sheet?