Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
change size of object
Sub changesquare()
Sheets("IZEN").activate ActiveSheet.Shapes("izensquare").Select Selection.ShapeRange.ScaleHeight Range("f4").Value, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleWidth Range("d4").Value, msoFalse, msoScaleFromTopLeft Range("a1").Select End Sub this changes the object by a percentage, how do i go about changing the size to like inches, if in f4 it says 5 have it 5inches, not 500% of current size thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
change size of object
You can set the pixel size of the shape like this:
Sub changesquare() Sheets("IZEN").Activate ActiveSheet.Shapes("izensquare").Select Selection.ShapeRange.Height = Range("F4").Value Selection.ShapeRange.Width = Range("D4").Value Range("A1").Select End Sub So for 5 inches your value in D4 would need to somewhere in the high hundreds. Hope this helps Rowan "choice" wrote: Sub changesquare() Sheets("IZEN").activate ActiveSheet.Shapes("izensquare").Select Selection.ShapeRange.ScaleHeight Range("f4").Value, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleWidth Range("d4").Value, msoFalse, msoScaleFromTopLeft Range("a1").Select End Sub this changes the object by a percentage, how do i go about changing the size to like inches, if in f4 it says 5 have it 5inches, not 500% of current size thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change font size on screen, but prints in old size | Excel Discussion (Misc queries) | |||
change scaling % but font size didnt change porportionally, pls he | Excel Discussion (Misc queries) | |||
Calendar - change of a size of this object | Excel Worksheet Functions | |||
size of embedded object | Excel Discussion (Misc queries) | |||
Set the size of a chart object | Excel Programming |