How to make a drawing that changes size by values entered?

  • Thread starter Thread starter carsya
  • Start date Start date
C

carsya

I need to make a free-form drawing (geometric shape) that will change
automatically by values specified in different cells.
Is there any way to do this (for a beginner), for example, using VB?
Thanks in advance.
 
What configuration of geometric shape and what is its function?

Excel has many buit-in shapes.

May be easier to use one of them and record a macro to see which numbers
have to be altered to re-position and re-size the shape.

Here is a basic rectangle drawing.

Sub Add_Box()
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 1, 1, _
Range("A1").Value, Range("A2").Value). _
Select
End Sub

Left =1 Top = 1 The position (in points) of the upper-left corner of the
AutoShape's bounding box relative to the upper-left corner of the document.

Width = A1 value Height = A2 value The width and height of the
AutoShape's bounding box, in points.

For freeform drawing see VBA help on BuildFreeform Method


Gord Dibben MS Excel MVP
 
Back
Top