ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   How to make a drawing that changes size by values entered? (https://www.excelbanter.com/new-users-excel/250025-how-make-drawing-changes-size-values-entered.html)

carsya

How to make a drawing that changes size by values entered?
 
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.

Gord Dibben

How to make a drawing that changes size by values entered?
 
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


On Thu, 3 Dec 2009 06:56:01 -0800, carsya
wrote:

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.




All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com