![]() |
Have the width/height of a autoshape placed in a cell
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? |
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? |
Have the width/height of a autoshape placed in a cell
Thanks Anony, this will help me out alot.
Edward Bachmann "Anony" wrote: 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? |
All times are GMT +1. The time now is 07:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com