Using p As New Pen(Color.Red) p.Width = 10 Dim g As Graphics = e.Graphics g.DrawRectangle(p, 10, 20, 100, 100) Console.WriteLine(g.width.tostring("d"), g.Height.tostring("d")) ~~~~~~~~ ~~~~~~~~~ End Using
Sub testRectangle() Dim myRec As Shape Set myRec = _ Sheet1.Shapes.AddShape( _ msoShapeRectangle, 0, 0, 100, 100) Debug.Print myRec.Width, myRec.Height End Sub